question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BLD: Compatibility issues with master branch cython

See original GitHub issue

Continuation of issue #33224


With the latest version of cython, running python setup.py build_ext --inplace -j 0 gives the following errors:


pandas/_libs/join.pyx:

building 'pandas._libs.join' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -DNPY_NO_DEPRECATED_API=0 -Ipandas/_libs/src/klib -I/home/user/Venvs/cythonM-pandas/lib/python3.8/site-packages/numpy/core/include -I/home/user/Venvs/cythonM-pandas/include -I/usr/include/python3.8 -c pandas/_libs/join.c -o build/temp.linux-x86_64-3.8/pandas/_libs/join.o
In file included from /usr/include/python3.8/tupleobject.h:41,
                 from /usr/include/python3.8/Python.h:105,
                 from pandas/_libs/join.c:32:
pandas/_libs/join.c: In function ‘__pyx_pf_6pandas_5_libs_4join_12inner_join_indexer.isra.0’:
/usr/include/python3.8/cpython/tupleobject.h:27:60: warning: array subscript -1 is below array bounds of ‘PyObject *[1]’ {aka ‘struct _object *[1]’} [-Warray-bounds]
   27 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i])
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
pandas/_libs/join.c:204503:27: note: in expansion of macro ‘PyTuple_GET_ITEM’
204503 |             PyObject *r = PyTuple_GET_ITEM(o, n);
       |                           ^~~~~~~~~~~~~~~~
pandas/_libs/join.c: In function ‘__pyx_pf_6pandas_5_libs_4join_10left_join_indexer.isra.0’:
/usr/include/python3.8/cpython/tupleobject.h:27:60: warning: array subscript -1 is below array bounds of ‘PyObject *[1]’ {aka ‘struct _object *[1]’} [-Warray-bounds]
   27 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i])
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
pandas/_libs/join.c:204503:27: note: in expansion of macro ‘PyTuple_GET_ITEM’
204503 |             PyObject *r = PyTuple_GET_ITEM(o, n);
       |                           ^~~~~~~~~~~~~~~~
pandas/_libs/join.c: In function ‘__pyx_pf_6pandas_5_libs_4join_8left_join_indexer_unique.isra.0’:
/usr/include/python3.8/cpython/tupleobject.h:27:60: warning: array subscript -1 is below array bounds of ‘PyObject *[1]’ {aka ‘struct _object *[1]’} [-Warray-bounds]
   27 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i])
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
pandas/_libs/join.c:204503:27: note: in expansion of macro ‘PyTuple_GET_ITEM’
204503 |             PyObject *r = PyTuple_GET_ITEM(o, n);
       |                           ^~~~~~~~~~~~~~~~
pandas/_libs/join.c: In function ‘__pyx_pf_6pandas_5_libs_4join_14outer_join_indexer.isra.0’:
/usr/include/python3.8/cpython/tupleobject.h:27:60: warning: array subscript -1 is below array bounds of ‘PyObject *[1]’ {aka ‘struct _object *[1]’} [-Warray-bounds]
   27 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i])
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
pandas/_libs/join.c:204503:27: note: in expansion of macro ‘PyTuple_GET_ITEM’
204503 |             PyObject *r = PyTuple_GET_ITEM(o, n);
       |                           ^~~~~~~~~~~~~~~~

pandas/_libs/reshape.pyx:

building 'pandas._libs.reshape' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 
-pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtun
e=generic -O3 -pipe -fno-plt -fPIC -DNPY_NO_DEPRECATED_API=0 -I/home/user/Venvs/cythonM-pandas/lib/python3.8/
site-packages/numpy/core/include -I/home/user/Venvs/cythonM-pandas/include -I/usr/include/python3.8 -c pandas
/_libs/reshape.c -o build/temp.linux-x86_64-3.8/pandas/_libs/reshape.o
In file included from /usr/include/python3.8/tupleobject.h:41,
                 from /usr/include/python3.8/Python.h:105,
                 from pandas/_libs/reshape.c:30:
pandas/_libs/reshape.c: In function ‘__pyx_pf_6pandas_5_libs_7reshape_unstack.isra.0’:
/usr/include/python3.8/cpython/tupleobject.h:27:60: warning: array subscript -1 is below array bounds of ‘PyObject *[1]’ {aka ‘struct _object *[1]’} [-Warray-bounds]
   27 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i])
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
pandas/_libs/reshape.c:29728:27: note: in expansion of macro ‘PyTuple_GET_ITEM’
29728 |             PyObject *r = PyTuple_GET_ITEM(o, n);
      |                           ^~~~~~~~~~~~~~~~

join_zip.zip

reshape_zip.zip


Output of pd.show_versions():

INSTALLED VERSIONS

commit : bd91f4577c5b54a72a4e092a7d7db43fec1b46bb python : 3.8.2.final.0 python-bits : 64 OS : Linux OS-release : 5.5.13.b-1-hardened machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8

pandas : 1.1.0.dev0+1159.gbd91f4577 numpy : 1.18.2 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 46.1.3 Cython : 3.0a0 (https://github.com/cython/cython/tree/30c891e0dc36a553455df9064ecb1f13414a12d2) pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : None IPython : 7.13.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : None numba : None

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
da-woodscommented, Apr 7, 2020

@WillAyd It’s definitely reproducible, and the warnings are pointing towards something that’ll actually crash (so it isn’t just a case of silencing warnings). I’ve submitted a fix for Cython so hopefully should be resolved soon. It’s obvious exactly where it’s coming from so doesn’t need further diagnostics here I think

The Cython fused dispatch code was changed to make it faster, but that’s clearly exposed a few other issues which need sorting.

0reactions
ShaharNavehcommented, Apr 8, 2020

This should be fixed in Cython now.

I can confirmed that this is fixed!

Thank you @da-woods!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyWavelets 1.0.2 Release Notes
Cython language compatibility has been pinned to language_level = '2' . This is in contrast to the master branch which is now using ......
Read more >
Contributing to pandas — pandas 0.24.0rc1 documentation
Trying the bug-producing code out on the master branch is often a worthwhile exercise to confirm the bug still exists. It is also...
Read more >
SciPy 1.5.2 Release Notes — SciPy v1.9.3 Manual
Issues closed for 1.5.2 ... #12579: BLD, MAINT: distutils issues in wheels repo ... #12591: BLD: fix cython error on master-branch cython.
Read more >
Release naming conventions | Git for Drupal project maintainers
If you prefix a branch name with a Drupal.org issue number, ... Git's default master branch should be avoided and no downloadable releases ......
Read more >
Of Git and GitHub, Master and Main - BiTE Interactive
Bad news: Git thinks the initial branch should be called master. GitHub thinks it should be called main. Good news: It's not a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found