osvenskan / posix_ipc

Other
135 stars 24 forks source link

PyEval_ThreadsInitialized and PyEval_InitThreads are deprecated #22

Closed sbraz closed 4 years ago

sbraz commented 4 years ago

Hi, Building the module with Python 3.9 shows that some deprecated functions are called:

posix_ipc_module.c: In function ‘MessageQueue_request_notification’:
posix_ipc_module.c:1923:9: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
 1923 |         if (!PyEval_ThreadsInitialized()) {
      |         ^~
In file included from /usr/include/python3.9/Python.h:145,
                 from posix_ipc_module.c:33:
/usr/include/python3.9/ceval.h:129:36: note: declared here
  129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
posix_ipc_module.c:1925:13: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
 1925 |             PyEval_InitThreads();
      |             ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.9/Python.h:145,
                 from posix_ipc_module.c:33:
/usr/include/python3.9/ceval.h:130:37: note: declared here
  130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
osvenskan commented 4 years ago

Noted! Thanks for letting me know.

osvenskan commented 4 years ago

fixed by PR #23/version 1.0.5