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.

Cython 0.29.14 and Py38 generates warnings for tp_print

See original GitHub issue

ref https://github.com/pandas-dev/pandas/issues/30609#issuecomment-606121355

Cythonizing files with 0.29.14 and Python 3.8 produces warnings such as the following:

pandas/io/sas/sas.c:20457:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/williamayd/miniconda3/envs/py38/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/williamayd/miniconda3/envs/py38/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
5 errors generated.

These did not appear in Cython 0.29.13. I think this may have to do with changes introduced in #3201

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
scodercommented, Apr 17, 2020

was the main reason to add the initializer…

Well, yes. The field is still there, so you get a warning if you don’t initialise it. And since it is deprecated, you get a warning that you’re accessing a deprecated field if you initialise it. Lovely.

2reactions
scodercommented, Mar 31, 2020

Yes, this is due to #3201.

Apparently, these warnings can be silenced, at least in gcc: https://stackoverflow.com/questions/13459602/how-can-i-get-rid-of-deprecated-warnings-in-deprecated-functions-in-gcc/13459924#13459924

Failing that, it seems that at least someone may end up being unhappy here – whoever doesn’t want to see deprecation warnings or whoever doesn’t want to see “missing initialiser” warnings.

This whole thing feels a bit insane to me…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cython 0.29.14 and Py38 generates warnings for tp_print -
Cython 0.29.14 and Py38 generates warnings for tp_print ... Cythonizing files with 0.29.14 and Python 3.8 produces warnings such as the following:
Read more >
Cython 0.29.14 - PyPI
This allows the compiler to generate very efficient C code from Cython code. This makes Cython the ideal language for writing glue code...
Read more >
Running setup.py install for h5py ... error
warning : no files found matching '*.pxd' under directory 'Cython/Utility' ... -fsuhdbkd/Cython-0.29.14/Cython/Plex/Scanners.c:7112:3: warning: 'tp_print' is ...
Read more >
Pip3: Cython error while installing spicy - Stack Overflow
... in <module> "generating Cython sources and expanding templates".format( File "/tmp/easy_install-5cn5y70d/numpy-1.22.3/setup.py", ...
Read more >
How to ignore the annoying Cython warnings in PyPy 6.0
This happens because whenever Cython compiles a pyx file, it generates C code which does a sanity check on the C size of...
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