Skip to content
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

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

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 lains@riseup.net

https://bugs.python.org/issue44210

Automerge-Triggered-By: GH:jaraco

Signed-off-by: Filipe Laíns <lains@riseup.net>
@jaraco
Copy link
Member

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

jaraco
jaraco approved these changes May 23, 2021
@miss-islington miss-islington merged commit df7eeac into python:main May 23, 2021
12 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 23, 2021

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 added a commit to miss-islington/cpython that referenced this issue May 23, 2021
…onGH-26299)

Signed-off-by: Filipe Laíns <lains@riseup.net>

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

Co-authored-by: Filipe Laíns <lains@riseup.net>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 23, 2021

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

@jaraco
Copy link
Member

@jaraco 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 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 <lains@riseup.net>
 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 <lains@riseup.net>
 Date: Sun May 23 20:04:05 2021 +0100
 1 file changed, 2 insertions(+)

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

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 issue May 23, 2021
…6299)

Signed-off-by: Filipe Laíns <lains@riseup.net>

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

Co-authored-by: Filipe Laíns <lains@riseup.net>
JuniorJPDJ added a commit to JuniorJPDJ/cpython that referenced this issue Aug 12, 2021
…onGH-26299)

Signed-off-by: Filipe Laíns <lains@riseup.net>

Automerge-Triggered-By: GH:jaraco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants