diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-08-06 11:32:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-06 11:32:37 (GMT) |
commit | a11158ecef8cff795f7db8f4047cbd20cc9cf37e (patch) | |
tree | d2bb78bba2629fca01ef6666a80360ed537b06cb /Python/pylifecycle.c | |
parent | 0a642d57736be6802c712bdbf2dcff39fe8a39b7 (diff) | |
download | cpython-a11158ecef8cff795f7db8f4047cbd20cc9cf37e.zip cpython-a11158ecef8cff795f7db8f4047cbd20cc9cf37e.tar.gz cpython-a11158ecef8cff795f7db8f4047cbd20cc9cf37e.tar.bz2 |
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.
(cherry picked from commit 4d77691172aae81bdcbb0ea75839d0e896c43781)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index d31a9c1..eeaf20b 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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(); |