-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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-104108: Add the Py_mod_multiple_interpreters Module Def Slot #104148
Merged
ericsnowcurrently
merged 8 commits into
python:main
from
ericsnowcurrently:module-def-slot-supports-interpreters
May 5, 2023
Merged
gh-104108: Add the Py_mod_multiple_interpreters Module Def Slot #104148
ericsnowcurrently
merged 8 commits into
python:main
from
ericsnowcurrently:module-def-slot-supports-interpreters
May 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FYI, I plan on adding a test for this. [done] |
ericsnowcurrently
requested review from
brettcannon,
ncoghlan and
warsaw
as code owners
May 4, 2023 23:25
3 tasks
Any objections to this PR? It's blocking the per-interpreter GIL PR, so I'd like to merge it as soon as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from docs missing, this looks good to me.
I'm going to circle back to the docs after feature freeze. |
carljm
added a commit
to carljm/cpython
that referenced
this pull request
May 5, 2023
* main: pythongh-99113: Add PyInterpreterConfig.own_gil (pythongh-104204) pythongh-104146: Remove unused var 'parser_body_declarations' from clinic.py (python#104214) pythongh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (pythongh-104205) pythongh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (pythongh-104148) pythongh-99113: Share the GIL via PyInterpreterState.ceval.gil (pythongh-104203) pythonGH-100479: Add `pathlib.PurePath.with_segments()` (pythonGH-103975) pythongh-69152: Add _proxy_response_headers attribute to HTTPConnection (python#26152) pythongh-103533: Use PEP 669 APIs for cprofile (pythonGH-103534) pythonGH-96803: Add three C-API functions to make _PyInterpreterFrame less opaque for users of PEP 523. (pythonGH-96849)
jbower-fb
pushed a commit
to jbower-fb/cpython-jbowerfb
that referenced
this pull request
May 8, 2023
…pythongh-104148) I'll be adding a value to indicate support for per-interpreter GIL in pythongh-99114.
ericsnowcurrently
added a commit
that referenced
this pull request
Nov 6, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Nov 6, 2023
… Py_LIMITED_API (pythongh-111707) This should have been done in pythongh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See pythongh-110968.) (cherry picked from commit 836e0a7) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
hugovk
pushed a commit
to hugovk/cpython
that referenced
this pull request
Nov 8, 2023
… Py_LIMITED_API (pythongh-111707) This should have been done in pythongh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See pythongh-110968.)
aisk
pushed a commit
to aisk/cpython
that referenced
this pull request
Feb 11, 2024
… Py_LIMITED_API (pythongh-111707) This should have been done in pythongh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See pythongh-110968.)
colesbury
pushed a commit
that referenced
this pull request
May 3, 2024
This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
SonicField
pushed a commit
to SonicField/cpython
that referenced
this pull request
May 8, 2024
This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with pythongh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
… Py_LIMITED_API (pythongh-111707) This should have been done in pythongh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See pythongh-110968.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'll be adding a value to indicate support for per-interpreter GIL in gh-99114.