Skip to content

gh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased)#145988

Merged
gpshead merged 1 commit intopython:mainfrom
gpshead:sys-flags-sequence-cap
Mar 15, 2026
Merged

gh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased)#145988
gpshead merged 1 commit intopython:mainfrom
gpshead:sys-flags-sequence-cap

Conversation

@gpshead
Copy link
Member

@gpshead gpshead commented Mar 15, 2026

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 .

@gpshead gpshead self-assigned this Mar 15, 2026
@gpshead gpshead enabled auto-merge (squash) March 15, 2026 20:13
@gpshead gpshead merged commit 4a71946 into python:main Mar 15, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant