Skip to content

Commit f412737

Browse files
committed
backport: do not add the deprecated marker
1 parent d946b3d commit f412737

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

Include/pythread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ PyAPI_FUNC(unsigned long) PyThread_start_new_thread(void (*)(void *), void *);
3333
* destructors.
3434
*
3535
* In either case there is a risk of invalid references remaining to data on the
36-
* thread stack.
36+
* thread stack. This is deprecated in 3.14 onwards. Retained for API compat.
3737
*/
38-
Py_DEPRECATED(3.14) PyAPI_FUNC(void) _Py_NO_RETURN PyThread_exit_thread(void);
38+
PyAPI_FUNC(void) _Py_NO_RETURN PyThread_exit_thread(void);
3939

4040
PyAPI_FUNC(unsigned long) PyThread_get_thread_ident(void);
4141

Misc/NEWS.d/next/C API/2022-08-05-19-41-20.gh-issue-87135.SCNBYj.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ terminate a thread that is running code not specifically designed to support
55
termination. In most cases this hanging is harmless since the process will
66
soon exit anyway.
77

8-
The ``PyThread_exit_thread`` function is now deprecated. Its behavior is
9-
inconsistent across platforms, and it can only be used safely in the
10-
unlikely case that every function in the entire call stack has been designed
11-
to support the platform-dependent termination mechanism. It is recommended
12-
that users of this function change their design to not require thread
13-
termination. In the unlikely case that thread termination is needed and can
14-
be done safely, users may migrate to calling platform-specific APIs such as
8+
While not officially marked deprecated until 3.14, ``PyThread_exit_thread``
9+
is no longer called internally and remains solely for interface compatibility.
10+
Its behavior is inconsistent across platforms, and it can only be used safely
11+
in the unlikely case that every function in the entire call stack has been
12+
designed to support the platform-dependent termination mechanism. It is
13+
recommended that users of this function change their design to not require
14+
thread termination. In the unlikely case that thread termination is needed and
15+
can be done safely, users may migrate to calling platform-specific APIs such as
1516
``pthread_exit`` (POSIX) or ``_endthreadex`` (Windows) directly.

0 commit comments

Comments
 (0)