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

importlib.metadata.PackageMetadata now has a get method #10021

Open
duckinator opened this issue Apr 7, 2023 · 3 comments
Open

importlib.metadata.PackageMetadata now has a get method #10021

duckinator opened this issue Apr 7, 2023 · 3 comments

Comments

@duckinator
Copy link

duckinator commented Apr 7, 2023

Previously, #7767 was closed because at the time the get method of PackageMetadata was considered an implementation detail, and @AlexWaygood said to open a new issue if that situation changes.

python/importlib_metadata#444 made it part of the API.

@Akuli
Copy link
Collaborator

Akuli commented Apr 7, 2023

If I understand importlib_metadata's README correctly, this will be included for the first time in Python 3.13.

@srittau
Copy link
Collaborator

srittau commented Apr 12, 2023

I'd be ok with fudging our rules a bit here, if in practice the get method was always present. But I have only superficial experience with PackageMetadata.

@Akuli
Copy link
Collaborator

Akuli commented Apr 12, 2023

I see another reason why we should add .get() on all Python versions. Let's say you have an implementation of PackageMetadata that doesn't have .get(). You probably want to get type checker errors for it as soon as possible, because it will no longer be a valid implementation of PackageMetadata in Python 3.13.

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

No branches or pull requests

3 participants