bpo-44584: Deprecate PYTHONTHREADDEBUG env var (GH-27065)

The threading debug (PYTHONTHREADDEBUG environment variable) is
deprecated in Python 3.10 and will be removed in Python 3.12. This
feature requires a debug build of Python.
This commit is contained in:
Victor Stinner 2021-08-06 13:11:12 +02:00 committed by GitHub
parent 938e84b4fa
commit 4d77691172
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 1 deletions

View file

@ -1057,6 +1057,8 @@ pyinit_main_reconfigure(PyThreadState *tstate)
static PyStatus
init_interp_main(PyThreadState *tstate)
{
extern void _PyThread_debug_deprecation(void);
assert(!_PyErr_Occurred(tstate));
PyStatus status;
@ -1158,6 +1160,9 @@ init_interp_main(PyThreadState *tstate)
#endif
}
// Warn about PYTHONTHREADDEBUG deprecation
_PyThread_debug_deprecation();
assert(!_PyErr_Occurred(tstate));
return _PyStatus_OK();