diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-04-18 12:39:32 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.ru> | 2022-04-18 12:39:32 +0300 |
commit | d4be68e361f4258cf0848fc70018dfe37a2acc24 (patch) | |
tree | 153e294cd97ac8b5d7a989612704a0c1f58e8ad4 /contrib/tools/python3/src/Python/thread.c | |
parent | 260c02f5ccf242d9d9b8a873afaf6588c00237d6 (diff) | |
download | ydb-d4be68e361f4258cf0848fc70018dfe37a2acc24.tar.gz |
IGNIETFERRO-1816 Update Python 3 from 3.9.12 to 3.10.4
ref:9f96be6d02ee8044fdd6f124b799b270c20ce641
Diffstat (limited to 'contrib/tools/python3/src/Python/thread.c')
-rw-r--r-- | contrib/tools/python3/src/Python/thread.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/tools/python3/src/Python/thread.c b/contrib/tools/python3/src/Python/thread.c index a10f5728dc..dfe28b6bdb 100644 --- a/contrib/tools/python3/src/Python/thread.c +++ b/contrib/tools/python3/src/Python/thread.c @@ -75,6 +75,25 @@ PyThread_init_thread(void) PyThread__init_thread(); } +void +_PyThread_debug_deprecation(void) +{ +#ifdef Py_DEBUG + if (thread_debug) { + // Flush previous dprintf() logs + fflush(stdout); + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "The threading debug (PYTHONTHREADDEBUG environment " + "variable) is deprecated and will be removed " + "in Python 3.12", + 0)) + { + _PyErr_WriteUnraisableMsg("at Python startup", NULL); + } + } +#endif +} + #if defined(_POSIX_THREADS) # define PYTHREAD_NAME "pthread" # include "thread_pthread.h" |