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

PyEval_ThreadsInitialized is deprecated in Python >= 3.7 #1482

Closed
abh3 opened this issue Jul 14, 2021 · 1 comment
Closed

PyEval_ThreadsInitialized is deprecated in Python >= 3.7 #1482

abh3 opened this issue Jul 14, 2021 · 1 comment
Assignees

Comments

@abh3
Copy link
Member

abh3 commented Jul 14, 2021

Once again, python moves faster than most projects. In this case Python 3.7 started deprecating use of PyEval_ThreadsInitialized() plus some other functions used in PyXRootDModule.cc and should be version checked. An example of such a fix can be seen in:

gjcarneiro/pybindgen@5fbeb8d

The specific error was reported in #1481 and the excerpt of the issue is below.

7: warning: 'int PyEval_ThreadsInitialized()' is deprecated [-Wdeprecated-declarations]
84 | if ( !PyEval_ThreadsInitialized() ) {
| ^
In file included from /usr/include/python3.9/Python.h:145,
from /home/saba/alice/sw/BUILD/70f7dfa756380c5669baf922e0068ee424a0ba3d/XRootD/bindings/python/src/PyXRootD.hh:28,
from /home/saba/alice/sw/BUILD/70f7dfa756380c5669baf922e0068ee424a0ba3d/XRootD/bindings/python/src/PyXRootDModule.cc:25:
/usr/include/python3.9/ceval.h:129:36: note: declared here
129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);

@simonmichal
Copy link
Contributor

simonmichal commented Aug 9, 2021

fixed in 2a98bf2

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

No branches or pull requests

2 participants