03.07.20 12:34, Victor Stinner пише:
PyEval_ReleaseLock() is deprecated since Python 3.2 in the documentation: https://docs.python.org/dev/c-api/init.html#c.PyEval_ReleaseLock
PyEval_AcquireLock() was annotated with Py_DEPRECATED() by Serhiy Storchaka in https://bugs.python.org/issue19569#msg280110 where he wrote:
"PyEval_ReleaseLock() is used in Python/pystate.c. It can't be replaced with PyEval_ReleaseThread() since the latter don't accept NULL."
I wrote in a previous email, I modified Python internals to no longer call PyEval_ReleaseLock(), but a new internal _PyEval_ReleaseLock(tstate) function instead.
Maybe we can still mark PyEval_ReleaseLock() as deprecated in Python 3.9, since it's just compiler warning, it's less intrusive than a warning emitted at runtime.
+1 for adding Py_DEPRECATED() in 3.9.