-
-
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-116608: Apply style and compatibility changes from importlib_metadata. #123028
Conversation
jaraco
commented
Aug 14, 2024
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: Un-deprecate functional API for importlib resources & add subdirectory support #116608
I applied some changes against importlib_resources 6.4 and then merged those with the cpython branch of importlib_resources, then copied the remaining diff over to CPython. These changes represent the re-synchronization of the two codebases, mainly getting the style to align with the linter/formatter's opinion, but also one change to the context managers to be compatible with Python 3.8 syntax. |
Since I believe these changes are largely uncontroversial and I was primarily looking to inform Petr of the changes, and because this PR is blocking another, I'm going to merge it, but happy to continue a review or even back out if needed. |
Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…_metadata. (pythonGH-123028) (cherry picked from commit e913d2c) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
GH-123051 is a backport of this pull request to the 3.13 branch. |
I just noticed that "metadata" appears in the commit message. These changes pertain to "resources". |
GH-123051 is a backport of this pull request to the 3.13 branch. |
Well, to me this looks like style fixes that are traditionally avoided in CPython, but it does look harmless. |
… from importlib_resources. (pythonGH-123028) (python#123051)" This reverts commit 5ac14ee. This commit should be re-applied after 3.13.0 final.
…nd compatibility changes from importlib_resources. (pythonGH-123028) (python#123051)" This reverts commit 5ac14ee. This commit should be re-applied after 3.13.0 final.
…pythongh-116608: Apply style and compatibility changes from importlib_resources. (pythonGH-123028) (python#123051)"" This reverts commit 0a058bc.
GH-123074 is a backport of this pull request to the 3.13 branch. |
The problem is that it's untenable given the constraints on the CPython repo to have divergent styles between the CPython implementation and the third-party package. Due to its shared maintenance with other skeleton projects, importlib_resources has a stricter standard for format, types, and lint. There's no VCS metadata to track the differences, so the process of contributing changes from |
Yeah, and from the other side, the custom tooling in |
I don't think adding it to PEP 360 would help much, given that the external project already provides most of that context (who maintains it, which versions are compatible), and the two codebases are maintained jointly. I note also that On several occasions, I've wanted to have a good place to document this regime, to include contribution instructions and maintenance instructions, but the main thing that's held me back is lack of an appropriate shared space (it felt awkward to put the docs in one project that apply equally to three). I seem to recall at one point I did document the process, but I'm unable to find it. Correction, I found it here. That guidance is still somewhat relevant, but also out of date and incomplete. I should probably just revive that doc in a maintained repo/wiki (probably importlib_metadata), and just link to it from the relevant projects. We should also update the My preference is to accept changes in the external project first for several reasons, that I'll document in the contributing guide, but I'm happy to accept contributions in CPython as long as the contribution is amenable to a backport. |