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-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased) by gpshead · Pull Request #145988 · python/cpython

Conversation

@gpshead

@gpshead gpshead commented Mar 15, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

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 .

  • Issue: sys.flags.gil should be a "sequence" attribute OR stop adding to the sequence #122575
  • Issue: Implement PEP 810 – Explicit lazy imports #142349

Sorry, something went wrong.

Uh oh!

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

All reactions
@gpshead
pythongh-122575: pythongh-142349: fix sys.flags tuple size (it uninte…
c152fbd
…ntionally increased)
@gpshead
gpshead requested a review from ericsnowcurrently as a code owner March 15, 2026 20:03
@gpshead gpshead added the skip news label Mar 15, 2026
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 15, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Mar 15, 2026
sys.flags.gil should be a "sequence" attribute OR stop adding to the sequence #122575
Closed
@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

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Mar 15, 2026
@Yhg1s Yhg1s added the topic-lazy-imports label Mar 17, 2026
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@gpshead @ljfp
pythongh-122575: pythongh-142349: fix sys.flags tuple size (it uninte…
4c6f1c5
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

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

Assignees

@gpshead gpshead

Labels

skip news topic-lazy-imports

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.

2 participants

@gpshead @Yhg1s
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.