Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-116608: Apply style and compatibility changes from importlib_metadata.#123028

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

jaraco
Copy link
Member

@jaracojaraco commentedAug 14, 2024
edited by bedevere-appbot
Loading

@jaraco
Copy link
MemberAuthor

I applied somechanges 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.

jaraco added a commit to python/importlib_resources that referenced this pull requestAug 14, 2024
@jaracojaraco added the needs backport to 3.13bugs and security fixes labelAug 14, 2024
@jaraco
Copy link
MemberAuthor

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.

encukou reacted with thumbs up emoji

@jaracojaraco merged commite913d2c intopython:mainAug 15, 2024
35 checks passed
@miss-islington-app
Copy link

Thanks@jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@jaracojaraco deleted the gh-116608/sync-importlib_metadata branchAugust 15, 2024 19:32
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestAug 15, 2024
…_metadata. (pythonGH-123028)(cherry picked from commite913d2c)Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@bedevere-app
Copy link

GH-123051 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelAug 15, 2024
@jaraco
Copy link
MemberAuthor

I just noticed that "metadata" appears in the commit message. These changes pertain to "resources".

@bedevere-app
Copy link

GH-123051 is a backport of this pull request to the3.13 branch.

jaraco added a commit that referenced this pull requestAug 15, 2024
…b_resources. (GH-123028) (#123051)gh-116608: Apply style and compatibility changes from importlib_metadata. (GH-123028)(cherry picked from commite913d2c)Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@encukou
Copy link
Member

Well, to me this looks like style fixes that are traditionally avoided in CPython, but it does look harmless.

jaraco added a commit to jaraco/cpython that referenced this pull requestAug 16, 2024
… from importlib_resources. (pythonGH-123028) (python#123051)"This reverts commit5ac14ee.This commit should be re-applied after 3.13.0 final.
jaraco added a commit to jaraco/cpython that referenced this pull requestAug 16, 2024
…nd compatibility changes from importlib_resources. (pythonGH-123028) (python#123051)"This reverts commit5ac14ee.This commit should be re-applied after 3.13.0 final.
jaraco added a commit to jaraco/cpython that referenced this pull requestAug 16, 2024
…pythongh-116608: Apply style and compatibility changes from importlib_resources. (pythonGH-123028) (python#123051)""This reverts commit0a058bc.
@bedevere-app
Copy link

GH-123074 is a backport of this pull request to the3.13 branch.

@jaraco
Copy link
MemberAuthor

Well, to me this looks like style fixes that are traditionally avoided in CPython, but it does look harmless.

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 otherskeleton 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 fromimportlib_resources (upstream) toimportlib.resources will overwrite any changes that weren't applied upstream. This change does that overwriting so that it's not folded into a subsequent contribution.

@encukou
Copy link
Member

Yeah, and from the other side, the custom tooling inimportlib_resources makes it harder than it could be to properly contribute toimportlib.resources.
I wonder if we should we addimportlib.resources toPEP-360, or otherwise makeimportlib_resources's style requirements, or contribution instructions in general, more discoverable?

@jaraco
Copy link
MemberAuthor

I wonder if we should we addimportlib.resources toPEP-360, or otherwise makeimportlib_resources's style requirements, or contribution instructions in general, more discoverable?

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 thatimportlib_metadata andzipp follow the same regime, and at least for those, the CPython docs to provide a link to the external mirror / backport. I note also that I run into similar issues withconfigparser, even though it follows amore conventional backport role,backports.tarfile,singledispatch, and probably others.

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, Ifound 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 theimportlib.resources docs to provide a reference toimportlib_resources.

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@encukouencukouAwaiting requested review from encukou

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jaraco@encukou

[8]ページ先頭

©2009-2025 Movatter.jp