◐ Shell
clean mode source ↗

gh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased) by gpshead · Pull Request #145988 · python/cpython

@gpshead

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.