GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104108: Add the Py_mod_multiple_interpreters Module Def Slot by ericsnowcurrently · Pull Request #104148 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented May 3, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I'll be adding a value to indicate support for per-interpreter GIL in gh-99114.

  • Issue: Add a Module Def Slot for Supporting Multiple Interpreters #104108

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ericsnowcurrently added 3 commits May 3, 2023 17:57
@ericsnowcurrently
Add the Py_mod_multiple_interpreters module def slot.
7afb005
@ericsnowcurrently
Add constants for the Py_mod_multiple_interpreters value.
d708985
@ericsnowcurrently
Add a NEWS entry.
8cb5a5a
@ericsnowcurrently
ericsnowcurrently requested a review from encukou May 3, 2023 23:58
@bedevere-bot bedevere-bot mentioned this pull request May 3, 2023
Add a Module Def Slot for Supporting Multiple Interpreters #104108
Closed
@bedevere-bot bedevere-bot added awaiting core review labels May 3, 2023
@ericsnowcurrently

ericsnowcurrently commented May 4, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

FYI, I plan on adding a test for this.

[done]

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ericsnowcurrently added 3 commits May 3, 2023 19:16
@ericsnowcurrently
Fix the flags.
340a469
@ericsnowcurrently
Fix the flags.
6e875bc
@ericsnowcurrently
Add a test.
338e255
@ericsnowcurrently
ericsnowcurrently requested review from brettcannon, ncoghlan and warsaw as code owners May 4, 2023 23:25
@ericsnowcurrently ericsnowcurrently mentioned this pull request May 4, 2023
gh-99113: A Per-Interpreter GIL! #99114
Closed
2 of 3 tasks
@ericsnowcurrently
Fix test_import.
1148aba
@ericsnowcurrently

ericsnowcurrently commented May 5, 2023

Copy link
Copy Markdown
Member Author

Any objections to this PR? It's blocking the per-interpreter GIL PR, so I'd like to merge it as soon as possible.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently ericsnowcurrently mentioned this pull request May 5, 2023
gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED #104205
Merged
@ericsnowcurrently
Resolve a warning.
6069a1c
erlend-aasland
erlend-aasland reviewed May 5, 2023
View reviewed changes

@erlend-aasland erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ericsnowcurrently reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ericsnowcurrently

ericsnowcurrently commented May 5, 2023

Copy link
Copy Markdown
Member Author

I'm going to circle back to the docs after feature freeze.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently
ericsnowcurrently merged commit 1c420e1 into python:main May 5, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label May 5, 2023
@ericsnowcurrently
ericsnowcurrently deleted the module-def-slot-supports-interpreters branch May 5, 2023 20:05
carljm added a commit to carljm/cpython that referenced this pull request May 5, 2023
@carljm
Merge branch 'main' into inlinecomp2
baacf5f
* 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 that referenced this pull request May 8, 2023
@ericsnowcurrently @jbower-fb
pythongh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (…
efc84cd
…pythongh-104148)

I'll be adding a value to indicate support for per-interpreter GIL in pythongh-99114.
@ericsnowcurrently ericsnowcurrently mentioned this pull request Nov 3, 2023
gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ under Py_LIMITED_API #111707
Merged
ericsnowcurrently added a commit that referenced this pull request Nov 6, 2023
@ericsnowcurrently
gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LI…
836e0a7
…MITED_API (gh-111707)

This should have been done in gh-104148.

(A similar fix has already be done for that slot's value macros, and backported to 3.12.  See gh-110968.)
@miss-islington miss-islington mentioned this pull request Nov 6, 2023
[3.12] gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh-111707) #111787
Merged
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 6, 2023
@ericsnowcurrently @miss-islington
pythongh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under…
978fb85
… 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 <[email protected]>
hugovk pushed a commit to hugovk/cpython that referenced this pull request Nov 8, 2023
@ericsnowcurrently @hugovk
pythongh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under…
7af88ed
… 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.)
ericsnowcurrently added a commit that referenced this pull request Nov 28, 2023
@miss-islington @ericsnowcurrently
[3.12] gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Unde…
f7251e2
…r Py_LIMITED_API (gh-111707) (gh-111787)

This should have been done in gh-104148.

(A similar fix has already be done for that slot's value macros, and backported to 3.12.  See gh-110968.)
(cherry picked from commit 836e0a7)

Co-authored-by: Eric Snow <[email protected]>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ericsnowcurrently @aisk
pythongh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under…
7b8129e
… 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.)
@swtaarrs swtaarrs mentioned this pull request Mar 15, 2024
gh-116322: Add Py_mod_gil module slot #116882
Merged
colesbury pushed a commit that referenced this pull request May 3, 2024
@swtaarrs
gh-116322: Add Py_mod_gil module slot (#116882)
c2627d6
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
@swtaarrs @SonicField
pythongh-116322: Add Py_mod_gil module slot (python#116882)
f301715
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
@ericsnowcurrently @Glyphack
pythongh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under…
71dc27c
… 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

Reviewers

@erlend-aasland erlend-aasland erlend-aasland left review comments
@encukou encukou Awaiting requested review from encukou
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ericsnowcurrently @erlend-aasland @bedevere-bot
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.