-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-134160: Use multi-phase init in documentation examples #134296
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
+228
−196
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8d8b366
Update docs
neonene 88c5f3f
Don't change an unrelated example
neonene a4ade5c
Apply suggestions from code review
neonene d6c42e2
ditto
neonene 97eae13
Suggested module names
neonene 8ae6bae
Avoid modernization
neonene bc78288
typo
neonene c3ab022
Correction: "error"
neonene d65303c
Rephrase warning
neonene aec6781
keywdarg_module
neonene 7dfd5ad
Update Doc/extending/extending.rst
neonene f7c72dd
Indicate xxlimited
neonene c84638c
Add seealso to index
neonene 4e59e88
Update Doc/extending/embedding.rst
neonene d68e3e3
ditto (for copy-paste)
neonene f6465bd
Shrink slots
neonene 1a65816
Remove module states
neonene a83e266
Correction: "SpamError"
neonene 2d10958
Add a Py_mod_multiple_interpreters slot
neonene a28e67c
Cancel the prvious addition as needless
neonene 9e6bff5
Merge remote-tracking branch 'upstream/main' into multi
AA-Turner d35a6b4
updates
AA-Turner 9cb3092
PEP 7
AA-Turner 6e5b1c5
revert module state for SpamError
AA-Turner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This is not correct for multi-phase initialization, without preventing the
exec
function from other module instances from overriding this pointer.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.
@encukou I added but then reverted (6e5b1c5) module state for this error type -- should we un-revert that commit? Sorry for my mistake here.
A
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 think it's fine -- module state deserves a better explanation a bit later in the tutorial. And the
ImportError
being added in the next PR is a good thing to show.The main thing I'd do differently is not backporting to 3.13 -- that's like pushing directly to production. 3.14 is out in a few months; that sounds like a good amount of time for this all to spend in prerelease.