This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [C API] Remove deprecated PyEval_InitThreads()
Type: Stage: resolved
Components: C API Versions: Python 3.11
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: methane, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2021-05-12 15:23 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26070 closed vstinner, 2021-05-12 15:28
PR 26071 merged vstinner, 2021-05-12 15:30
Messages (4)
msg393524 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-12 15:23
Remove PyEval_InitThreads() and PyEval_ThreadsInitialized() functions. The GIL is created by Py_Initialize() since Python 3.7, and so calling PyEval_InitThreads() explicitly was useless since Python 3.7. Deprecated in 3.9, PyEval_InitThreads() did nothing and PyEval_ThreadsInitialized() already returned true.
msg393626 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2021-05-14 06:23
It seems they are stable ABI.

https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L604
https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L614

We may need to keep no-op API until Python 4?
msg393630 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-05-14 07:53
Should not they be kept for binary compatibility, so you can link with extensions compiled for older Python versions? They can be removed from headers, so newly compiled extensions will not be able to use them.
msg396685 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-06-29 00:16
The function is part of the stable ABI so I prefer to keep it for now.
https://github.com/python/cpython/pull/26070#issuecomment-839871560

I close the issue.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88283
2021-06-29 00:16:01vstinnersetstatus: open -> closed
resolution: rejected
messages: + msg396685

stage: patch review -> resolved
2021-05-14 07:53:19serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg393630
2021-05-14 06:23:23methanesetnosy: + methane
messages: + msg393626
2021-05-12 15:30:43vstinnersetpull_requests: + pull_request24711
2021-05-12 15:28:29vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request24710
2021-05-12 15:23:48vstinnercreate