Skip to content

bpo-44117: Remove PyEval_InitThreads()#26070

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:remove_pyeval_initthreads
Closed

bpo-44117: Remove PyEval_InitThreads()#26070
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:remove_pyeval_initthreads

Conversation

@vstinner

@vstinner vstinner commented May 12, 2021

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@encukou

encukou commented May 12, 2021

Copy link
Copy Markdown
Member

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
Copy Markdown

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
Copy Markdown
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