Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-121735: Fix module-adjacent references in zip files (gh-123037) #124011

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Sep 12, 2024

This PR is a selective backport of gh-123037, pulling only the fix and a one-off test to protect the behavior, but avoiding the test suite refactoring (which could not be backported as it also relies on other features only in Python 3.13).

@jaraco jaraco requested review from warsaw and FFY00 as code owners September 12, 2024 15:12
@jaraco jaraco changed the title [3.12] gh-121735: Fix module-adjacent references in zip files [3.12] gh-121735: Fix module-adjacent references in zip files (gh-123037) Sep 12, 2024
@jaraco jaraco force-pushed the backport-ba687d9-3.12 branch from 9712573 to 2d64973 Compare September 12, 2024 15:24
@jaraco jaraco removed the request for review from warsaw September 12, 2024 15:25
@jaraco jaraco marked this pull request as draft September 12, 2024 15:42
@jaraco
Copy link
Member Author

jaraco commented Sep 12, 2024

That's weird. The tests are failing in CI, but they're passing for me locally. I wonder why that is.

@jaraco
Copy link
Member Author

jaraco commented Sep 12, 2024

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:

  1. 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.
  2. 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.

@jaraco jaraco force-pushed the backport-ba687d9-3.12 branch from 2d64973 to b0b7da1 Compare September 12, 2024 18:07
@jaraco jaraco marked this pull request as ready for review September 12, 2024 18:08
@Yhg1s Yhg1s merged commit c60d978 into python:3.12 Sep 24, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants