-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
gh-121735: Fix module-adjacent references in zip files #123037
Conversation
Note that a lot of refactoring happened in the test suite to enable testing this behavior. The history of the refactoring can be found in python/importlib_resources@f77da58...23afc90. These changes were released with |
I'm a little apprehensive about the prospect of backporting this to Python 3.12, given the amount of refactoring that had to happen in the tests to make them viable. I may opt to backport the fix but limit the amount of changes backported to the tests, depending on how complicated it turns out to be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay to me.
I don't really have any strong opinion regarding backporting the changes to 3.12. I agree it would be nicer to backport without the large test suite refactoring, but that isn't unreasonable to me if the changes don't end up applying cleanly. Not backporting the test suite changes also increases the possibility for test suite bugs to sneak into the 3.12 branch, as that won't be maintained as closely as the main branch. Additionally, it can also cause conflicts when backporting other fixes, so, eh, I guess I am +0.5 on backporting this PR as a whole.
@Gatsik - the implementation provided herein has already been reviewed and released as
It's not obvious to me from this fix what the failure mode is. I think I see it now - if the |
Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…H-123037) * pythongh-116608: Apply style and compatibility changes from importlib_metadata. * pythongh-121735: Ensure module-adjacent resources are loadable from a zipfile. * pythongh-121735: Allow all modules to be processed by the ZipReader. * Add blurb * Remove update-zips script, unneeded. * Remove unnecessary references to removed static fixtures. * Remove zipdata fixtures, unused. (cherry picked from commit ba687d9) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Sorry, @jaraco, I could not cleanly backport this to
|
GH-123986 is a backport of this pull request to the 3.13 branch. |
|
|
|
|
…ythonGH-123037) * pythongh-116608: Apply style and compatibility changes from importlib_metadata. * pythongh-121735: Ensure module-adjacent resources are loadable from a zipfile. * pythongh-121735: Allow all modules to be processed by the ZipReader. * Add blurb * Remove update-zips script, unneeded. * Remove unnecessary references to removed static fixtures. * Remove zipdata fixtures, unused. (cherry picked from commit ba687d9) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
In jaraco/cpython@330cfcdae71, I've started work on a backport, but it's really broken. I got stuck when |
…ythonGH-123037) * pythongh-116608: Apply style and compatibility changes from importlib_metadata. * pythongh-121735: Ensure module-adjacent resources are loadable from a zipfile. * pythongh-121735: Allow all modules to be processed by the ZipReader. * Add blurb * Remove update-zips script, unneeded. * Remove unnecessary references to removed static fixtures. * Remove zipdata fixtures, unused. (cherry picked from commit ba687d9) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
GH-124011 is a backport of this pull request to the 3.12 branch. |
) (#123986) * gh-121735: Fix module-adjacent references in zip files (GH-123037) * gh-116608: Apply style and compatibility changes from importlib_metadata. * gh-121735: Ensure module-adjacent resources are loadable from a zipfile. * gh-121735: Allow all modules to be processed by the ZipReader. * Add blurb * Remove update-zips script, unneeded. * Remove unnecessary references to removed static fixtures. * Remove zipdata fixtures, unused. (cherry picked from commit ba687d9) * gh-123994: Generate utf-16 file using little endian and BOM. (#123995) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Merge after #123028.