GeezerVison is showing github.com — gh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased) by gpshead · Pull Request #145988 · python/cpython
Conversation
gpshead
commented
Mar 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
See #122575 (comment) for rationale. the lazy imports PEP initial implementation inadvertently increased the length of the sys.flags tuple. In a way that did not do anything useful or related to lazy imports (it exposed sys.flags.gil in the tuple). This fixes that to hard code the length to the 3.13 length of 18 and have our tests and code comments make it clear that we've since stopped making new sys.flags attributes available via sequence index.
internal implementation detail, no news entry. pulls an equivalent change to do this out of already large PR #129337 .
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ljfp
pushed a commit
to ljfp/cpython
that referenced
this pull request
Apr 25, 2026
…ntionally increased) (pythonGH-145988)
the lazy imports PEP initial implementation (3.15 alpha) inadvertently incremented the length of the sys.flags tuple. In a way that did not do anything useful or related to the lazy imports setting (it exposed sys.flags.gil in the tuple). This fixes that to hard code the length to the 3.13 & 3.14 released length of 18 and have our tests and code comments make it clear that we've since stopped making new sys.flags attributes available via sequence index.
Reviewers
ericsnowcurrently
Awaiting requested review from ericsnowcurrently
ericsnowcurrently is a code owner
Uh oh!
There was an error while loading. Please reload this page.
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.
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.