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-134160: Block multiple module initialization by encukou · Pull Request #134773 · python/cpython

Conversation

@encukou

@encukou encukou commented May 27, 2025 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Change the tutorial to block multiple module initialization, and note the reference leak.

  • Issue: Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types #134160

📚 Documentation preview 📚: https://cpython-previews--134773.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
@encukou
pythongh-134160: Block multiple module initialization
d2ef0c3
@bedevere-app bedevere-app Bot added the awaiting core review label May 27, 2025
@bedevere-app bedevere-app Bot mentioned this pull request May 27, 2025
Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types #134160
Open
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels May 27, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs May 27, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 27, 2025
@encukou

encukou commented May 27, 2025

Copy link
Copy Markdown
Member Author

There's a better way to do this, but module state might work better in Chapter 2?

neonene 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.

neonene
neonene reviewed May 27, 2025
View reviewed changes
Comment thread Doc/extending/extending.rst Resolved

Uh oh!

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

ZeroIntensity
ZeroIntensity reviewed May 27, 2025
View reviewed changes

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

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.

I just realized that we don't have any dedicated section on subinterpreters. I'd be happy to do that in a follow-up.

Sorry, something went wrong.

Uh oh!

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

neonene and AA-Turner reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
Comment thread Doc/extending/extending.rst Resolved

Uh oh!

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

StanFromIreland
StanFromIreland reviewed May 27, 2025
View reviewed changes
Comment thread Doc/extending/extending.rst Resolved

Uh oh!

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

encukou and others added 2 commits May 27, 2025 17:38
@encukou
Update Doc/extending/extending.rst
c53b208
@AA-Turner @encukou
Update Doc/extending/extending.rst
e961fac
Co-authored-by: Petr Viktorin <[email protected]>
AA-Turner
AA-Turner reviewed May 27, 2025
View reviewed changes
Comment thread Doc/extending/extending.rst Resolved

Uh oh!

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

AA-Turner
AA-Turner reviewed May 27, 2025
View reviewed changes
Comment thread Doc/extending/extending.rst Resolved

Uh oh!

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

AA-Turner
AA-Turner approved these changes May 27, 2025
View reviewed changes

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

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.

Two very minor suggestions, but otherwise let's get this merged quickly.

A

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 27, 2025
@AA-Turner AA-Turner added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels May 27, 2025
@encukou @AA-Turner
Apply suggestions from code review
c562e2e
Co-authored-by: Adam Turner <[email protected]>
@AA-Turner
AA-Turner merged commit 469a564 into python:main May 28, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 28, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label May 28, 2025
@miss-islington-app

miss-islington-app Bot commented May 28, 2025

Copy link
Copy Markdown

Thanks @encukou for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2025
@encukou @AA-Turner @miss-islington
pythongh-134160: Block multiple module initialization (pythonGH-134773)
bd36c93
(cherry picked from commit 469a564)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2025
@encukou @AA-Turner @miss-islington
pythongh-134160: Block multiple module initialization (pythonGH-134773)
6d5c370
(cherry picked from commit 469a564)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@bedevere-app

bedevere-app Bot commented May 28, 2025

Copy link
Copy Markdown

GH-134827 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 28, 2025
@bedevere-app

bedevere-app Bot commented May 28, 2025

Copy link
Copy Markdown

GH-134828 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 28, 2025
@encukou
encukou deleted the extending-exec-once branch May 28, 2025 07:56
AA-Turner added a commit that referenced this pull request May 28, 2025
@miss-islington @encukou @AA-Turner
[3.14] gh-134160: Block multiple module initialization (GH-134773) (#…
998cedb
…134827)

gh-134160: Block multiple module initialization (GH-134773)
(cherry picked from commit 469a564)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
AA-Turner added a commit that referenced this pull request May 28, 2025
@miss-islington @encukou @AA-Turner
[3.13] gh-134160: Block multiple module initialization (GH-134773) (#…
067df2b
…134828)

gh-134160: Block multiple module initialization (GH-134773)
(cherry picked from commit 469a564)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
@encukou @AA-Turner @Pranjal095
pythongh-134160: Block multiple module initialization (python#134773)
6adbe96
Co-authored-by: Adam Turner <[email protected]>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@encukou @AA-Turner @taegyunkim
pythongh-134160: Block multiple module initialization (python#134773)
e8d345a
Co-authored-by: Adam Turner <[email protected]>
gostak-dd pushed a commit to gostak-dd/cpython that referenced this pull request Jun 2, 2026
@encukou @AA-Turner @gostak-dd
pythongh-134160: Block multiple module initialization (python#134773)
b49a480
Co-authored-by: Adam Turner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ZeroIntensity ZeroIntensity ZeroIntensity left review comments
@StanFromIreland StanFromIreland StanFromIreland left review comments
@AA-Turner AA-Turner AA-Turner approved these changes
+1 more reviewer
@neonene neonene neonene left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

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.

5 participants

@encukou @AA-Turner @ZeroIntensity @neonene @StanFromIreland
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 01402503 — 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.