PythonMonkey
PythonMonkey copied to clipboard
python 3.13 support
In order to make PythonMonkey support the upcoming (October 1, 2024) Python 3.13 release, the following changes/actions need to be made in the codebase:
-
Python 3.13 added a
PyLong_AsNativeBytes API, but also changed the function signature of the_PyLong_AsByteArrayAPI (https://github.com/python/cpython/issues/111140) -
_Py_IsFinalizingbecomes a stable API in Python 3.13, and is renamed toPy_IsFinalizing -
Python 3.13 moved several undocumented APIs to private and internal-only, i.e. removed from public use.
_PyDictView*APIs are removed._PyArg_CheckPositionalAPI is removed._PyErr_SetKeyErrorAPI is removed. https://github.com/python/cpython/pull/108607_PyThreadState_GetDict(tstate)API gets removed.- However, there would be no perfect replacement fix.
- It's currently impossible in Python 3.13 to get the thread dictionary on a specific thread other than the current thread. (the public PyThreadState_GetDict() API can only get from the current thread)
Closes https://github.com/Distributive-Network/PythonMonkey/issues/441