Skip to content

bpo-44210: make importlib.metadata._meta.PackageMetadata public #26299

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

Merged
merged 1 commit into from
May 23, 2021

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented May 21, 2021

Signed-off-by: Filipe Laíns [email protected]

https://bugs.python.org/issue44210

Automerge-Triggered-By: GH:jaraco

@jaraco
Copy link
Member

jaraco commented May 23, 2021

This looks good. It just needs to go into the backport too. I'll use this PR to illustrate how I accomplish that.

@miss-islington miss-islington merged commit df7eeac into python:main May 23, 2021
@miss-islington
Copy link
Contributor

Thanks @FFY00 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 23, 2021
…onGH-26299)

Signed-off-by: Filipe Laíns <[email protected]>

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit df7eeac)

Co-authored-by: Filipe Laíns <[email protected]>
@bedevere-bot
Copy link

GH-26320 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 23, 2021
@jaraco
Copy link
Member

jaraco commented May 23, 2021

Now that the PR is merged, the commit is stable in CPython, so I can target that commit to cherry-pick into importlib_metadata.

@jaraco
Copy link
Member

jaraco commented May 23, 2021

From the importlib_metadata checkout main branch, I fetch the cpython repo (this pulls in a lifetime of commits).

importlib_metadata main $ git fetch gh://python/cpython main
remote: Enumerating objects: 723658, done.
remote: Counting objects: 100% (300/300), done.
remote: Compressing objects: 100% (178/178), done.
remote: Total 723658 (delta 153), reused 225 (delta 122), pack-reused 723358
Receiving objects: 100% (723658/723658), 315.34 MiB | 9.07 MiB/s, done.
Resolving deltas: 100% (577353/577353), done.
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD

Because importlib_metadata has a cpython branch, it is aware of the mapping from Lib/importlib/metadata to importlib_metadata, so in some cases (and indeed this one), simply cherry-picking the commit will work:

importlib_metadata main $ git cherry-pick df7eeacd83f531dd67cec7bc483dec6dce17ddbd
Auto-merging importlib_metadata/__init__.py
[main f91fe6da3fc] [bpo-44210](https://bugs.python.org/issue44210): make importlib.metadata._meta.PackageMetadata public (GH-26299)
 Author: Filipe Laíns <[email protected]>
 Date: Sun May 23 20:04:05 2021 +0100
 2 files changed, 3 insertions(+)
 create mode 100644 Misc/NEWS.d/next/Library/2021-05-21-21-23-43.[bpo-44210](https://bugs.python.org/issue44210).5afQ3K.rst

But, we don't want the 'Misc' file, so remove it:

importlib_metadata main $ rm -r Misc
importlib_metadata main $ git commit -a --amend --no-edit
[main 786c7440e53] [bpo-44210](https://bugs.python.org/issue44210): make importlib.metadata._meta.PackageMetadata public (GH-26299)
 Author: Filipe Laíns <[email protected]>
 Date: Sun May 23 20:04:05 2021 +0100
 1 file changed, 2 insertions(+)

Now push that commit (python/importlib_metadata@786c7440e53):

importlib_metadata main $ git push
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 534 bytes | 534.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To https://github.com/python/importlib_metadata
   a956dc531d0..786c7440e53  main -> main

Optionally, consider cleaning up all those CPython commits with git gc.

miss-islington added a commit that referenced this pull request May 23, 2021
…6299)

Signed-off-by: Filipe Laíns <[email protected]>

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit df7eeac)

Co-authored-by: Filipe Laíns <[email protected]>
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.

5 participants