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 — [3.12] gh-121735: Fix module-adjacent references in zip files (gh-123037) by jaraco · Pull Request #124011 · python/cpython

Conversation

@jaraco

@jaraco jaraco commented Sep 12, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

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).

  • [3.12] Can't open orphan path on bare importlib.resources.files() under zipapp #121735: Fix module-adjacent references in zip files
  • Backport the test capturing the behavior selectively.

Sorry, something went wrong.

Uh oh!

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

All reactions
@jaraco
jaraco requested review from FFY00 and warsaw as code owners September 12, 2024 15:12
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 12, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 12, 2024
Can't open orphan path on bare importlib.resources.files() under zipapp #121735
Closed
@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
@bedevere-app bedevere-app Bot mentioned this pull request Sep 12, 2024
gh-121735: Fix module-adjacent references in zip files #123037
Merged
@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
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 12, 2024
@jaraco

jaraco commented Sep 12, 2024

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@jaraco

jaraco commented Sep 12, 2024

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

jaraco added 3 commits September 12, 2024 14:07
@jaraco
[3.12] pythongh-121735: Fix module-adjacent references in zip files
dde843d
Applying the fix only and not the refactoring of the test suite.
@jaraco
Backport the test capturing the behavior selectively.
5994e7e
@jaraco
Bring back the blurb.
b0b7da1
@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
@jaraco
jaraco requested review from brettcannon, encukou, ericsnowcurrently and ncoghlan as code owners September 12, 2024 18:08
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 12, 2024
@jaraco
jaraco removed request for brettcannon, encukou, ericsnowcurrently and ncoghlan September 12, 2024 18:08
@Yhg1s
Yhg1s merged commit c60d978 into python:3.12 Sep 24, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

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

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@jaraco @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.