Visitar URL original
bpo-44117: Remove PyEval_InitThreads() by vstinner · Pull Request #26070 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20251010073613/https://github.com/python/cpython/pull/26070
Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 12, 2021 •

Remove PyEval_InitThreads() and PyEval_ThreadsInitialized()
functions. The GIL is created by Py_Initialize() since Python 3.7,
and so calling explicitly PyEval_InitThreads() was useless since
Python 3.7. Deprecated in 3.9, PyEval_InitThreads() did nothing and
PyEval_ThreadsInitialized() already returned true.

https://bugs.python.org/issue44117

Remove PyEval_InitThreads() and PyEval_ThreadsInitialized()
functions. The GIL is created by Py_Initialize() since Python 3.7,
and so calling explicitly PyEval_InitThreads() was useless since
Python 3.7. Deprecated in 3.9, PyEval_InitThreads() did nothing and
PyEval_ThreadsInitialized() already returned true.
@vstinner
Copy link
Member Author

cc @encukou: FYI this PR removes a function from the stable ABI. It was deprecated for 2 Python releases.

@encukou
Copy link
Member

encukou commented May 12, 2021

Please do not remove functions from the stable ABI. They can be removed from the API (i.e. headers), but should stay in the stable ABI.

It is OK if they do nothing.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jun 12, 2021
@vstinner
Copy link
Member Author

Please do not remove functions from the stable ABI.

Oh. I didn't notice that. I close my PR and its associated issue.

I'm not interested to attempt to only remove it from the API (header files).

@vstinner vstinner closed this Jun 29, 2021
@vstinner vstinner deleted the remove_pyeval_initthreads branch June 29, 2021 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants