1
0
mirror of https://github.com/thp/pyotherside.git synced 2025-01-17 23:22:53 +08:00

Don't call PyEval_InitThreads() on Python 3.7+ (#132)

Since Python 3.7, the function does nothing. Moreover, it's deprecated since Python 3.9:
https://docs.python.org/3.12/c-api/init.html#c.PyEval_InitThreads

Since pyotherside requires Python 3.8, simply remove the call.
This commit is contained in:
Victor Stinner 2024-05-31 08:37:58 +02:00 committed by GitHub
parent 9a4d1a2a35
commit 4fa3406775
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -499,7 +499,7 @@ The image provider must return a tuple ``(data, size, format)``:
The pixel format of ``data`` (see `constants`_),
``pyotherside.format_data`` if ``data`` contains an
encoded (PNG/JPEG) image instead of raw pixel data
or ``pyotherside.format_svg_data`` if ``data`` contains
or ``pyotherside.format_svg_data`` if ``data`` contains
SVG image XML data.
In order to register the image provider with PyOtherSide for use
@ -1196,6 +1196,12 @@ flags for compiling and linking against Python on your system.
ChangeLog
=========
Version UNRELEASED
------------------
* No longer call PyEval_InitThreads() at Python startup. It's no longer needed
since Python 3.7.
Version 1.6.1 (2024-05-18)
--------------------------

View File

@ -532,7 +532,6 @@ QPythonPriv::QPythonPriv()
PyImport_AppendInittab("pyotherside", PyOtherSide_init);
Py_InitializeEx(0);
PyEval_InitThreads();
// Initialize sys.argv (https://github.com/thp/pyotherside/issues/77)
int argc = 1;