Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython warnings about 'tp_print' which is deprecated #1033

Open
1 of 3 tasks
bcoconni opened this issue Feb 5, 2024 · 0 comments
Open
1 of 3 tasks

Cython warnings about 'tp_print' which is deprecated #1033

bcoconni opened this issue Feb 5, 2024 · 0 comments
Labels

Comments

@bcoconni
Copy link
Member

bcoconni commented Feb 5, 2024

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

Describe the issue
The compiler issues repeatedly the following warning while compiling JSBSim on MacOSX:

/Users/runner/work/jsbsim/jsbsim/build/python/_jsbsim.cxx:32476:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/runner/hostedtoolcache/Python/3.8.18/x64/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/runner/hostedtoolcache/Python/3.8.18/x64/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^

What is the current behavior?
As stated above.

What is the expected behavior?
JSBSim should not use deprecated features.

Please tell us about your environment:
MacOSX + Python 3.8

Other information
This is a known issue of Cython: cython/cython#3474 which occurs only on MacOSX with Python 3.8

There are a number of options that could be taken to silence this warning including sending a flag to the compiler to ignore deprecation warnings (i.e. something like -Wno-deprecated-declarations). But given that the issue is limited to MacOSX with Python 3.8 and that Python 3.8 will reach its EOL by October this year (see PEP 569), I suggest that we live with these warnings for a few more months. That would save some additional code in setup.py that would need to be removed later.

As such, this issue is created for the record and is tagged "won't fix". It will be closed when JSBSim support of Python 3.8 will end which should be circa October/November 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant