Skip to content

gh-115482: Assume the Main Interpreter is Always Running "main" #115484

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

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Feb 14, 2024

This is a temporary fix to unblock embedders that do not call Py_Main().

_PyInterpreterState_IsRunningMain() will always return true for the main interpreter, even in corner cases where it technically should not. The (future) full solution will do the right thing in those corner cases.

@ericsnowcurrently
Copy link
Member Author

@freakboy3742, please let me know if this does not get the test passing for you.

@freakboy3742
Copy link
Contributor

I can confirm this works for me. Thanks for the fast response!

@ericsnowcurrently ericsnowcurrently merged commit 4684301 into python:main Feb 14, 2024
@ericsnowcurrently ericsnowcurrently deleted the temp-fix-interp-running-main branch February 14, 2024 23:07
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.

2 participants