Skip to content

bpo-46008: Move Py*State init into distinct functions. #29977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 8, 2021

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Dec 8, 2021

Currently basic initialization of PyInterprterState happens in PyInterpreterState_New() (along with allocation and adding the new interpreter to the runtime state). This prevents us from initializing interpreter states that were allocated separately (e.g. statically or in a free list). We address that here by factoring out a separate function just for initialization. We do the same for PyThreadState. _PyRuntimeState was sorted out when we added it since _PyRuntime is statically allocated. However, in this PR we update the existing init code to line up with the functions for PyInterpreterState and PyThreadState.

(There should be zero change in behavior.)

https://bugs.python.org/issue46008

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 7b376d4 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 8, 2021
@ericsnowcurrently ericsnowcurrently merged commit 32a6724 into python:main Dec 8, 2021
@ericsnowcurrently ericsnowcurrently deleted the runtime-state-init branch December 8, 2021 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants