Skip to content
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

gh-99113: Add a check for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED #104206

Merged

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented May 5, 2023

Py_MOD_PER_INTERPRETER_GIL_SUPPORTED is a new supported value for Py_mod_multiple_interpreters, added in gh-104205.

(This is blocked until PyInterpreterState.ceval.own_gil is added in gh-104204.)

ericsnowcurrently added a commit that referenced this pull request May 5, 2023
Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules.  We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BTW, the branch in lines 295-300 seems lack coverage (disclaimer: I only ran test_import)

Modules/_testmultiphase.c Show resolved Hide resolved
Lib/test/test_import/__init__.py Show resolved Hide resolved
@ericsnowcurrently
Copy link
Member Author

Thanks for pointing out about the missing test coverage. I've added it. I also did likewise for the similar case where Py_mod_create is provided multiple times, which did not have test coverage either.

@erlend-aasland
Copy link
Contributor

Thanks for pointing out about the missing test coverage. I've added it. I also did likewise for the similar case where Py_mod_create is provided multiple times, which did not have test coverage either.

Nice, thanks! I can confirm that those branches are now covered.

@ericsnowcurrently ericsnowcurrently enabled auto-merge (squash) May 6, 2023 21:52
@ericsnowcurrently ericsnowcurrently merged commit fff193b into python:main May 6, 2023
19 checks passed
@ericsnowcurrently ericsnowcurrently deleted the own-gil-extension-check branch May 6, 2023 21:57
jbower-fb pushed a commit to jbower-fb/cpython-jbowerfb that referenced this pull request May 8, 2023
…4205)

Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules.  We will start checking for it in pythongh-104206 (once PyInterpreterState.ceval.own_gil is added in pythongh-104204).
jbower-fb pushed a commit to jbower-fb/cpython-jbowerfb that referenced this pull request May 8, 2023
…ythongh-104206)

Py_MOD_PER_INTERPRETER_GIL_SUPPORTED is a new supported value for Py_mod_multiple_interpreters, added in pythongh-104205.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants