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

WheelDistribution doesn't implement abstract methods of importlib.metadata.Distribution #11684

Open
1 task done
jaraco opened this issue Jan 1, 2023 · 1 comment · May be fixed by #11685
Open
1 task done

WheelDistribution doesn't implement abstract methods of importlib.metadata.Distribution #11684

jaraco opened this issue Jan 1, 2023 · 1 comment · May be fixed by #11685
Labels
state: needs eyes Needs a maintainer/triager to take a closer look type: maintenance Related to Development and Maintenance Processes

Comments

@jaraco
Copy link
Member

jaraco commented Jan 1, 2023

Description

In python/cpython#100466, we learned that pip implements a WheelDistribution derived from importlib.metadata.Distribution, but doesn't implement the abstract methods. This usage was allowed because the ABC didn't derive from abc.ABCMeta. I don't recall if that choice was intentional or not, but attempting to enforce the definition of abstract methods in subclasses breaks pip invocations.

Expected behavior

Pip should implement the abstract methods (even if just trivially).

pip version

22.3.1

Python version

3.12a3ish

OS

all

How to Reproduce

Apply the patch from the referenced Python PR to the Python stdlib and invoke pip install.

Output

No response

Code of Conduct

@jaraco jaraco added type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Jan 1, 2023
@ichard26 ichard26 added type: maintenance Related to Development and Maintenance Processes state: needs eyes Needs a maintainer/triager to take a closer look and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Apr 25, 2024
@ichard26
Copy link
Member

It should be noted that partial implementation of the Distribution interface is now deprecated: python/importlib_metadata#451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs eyes Needs a maintainer/triager to take a closer look type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants