[3.12] gh-121735: Fix module-adjacent references in zip files (gh-123037) by jaraco · Pull Request #124011 · python/cpython
That's weird. The tests are failing in CI, but they're passing for me locally. I wonder why that is.
The issue was twofold:
- I failed to copy the whole fix, which requires changes to
Lib/zipimport.py, which I'd missed because it was separated from the other crucial change by many changes to tests. - Because I was running the tests against a previous build, the zipimport hadn't been recompiled, so was still using a bootstrap zip importer with the needed changes.
Rebuilding cpython from scratch allowed the issue to replicate.