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

[1.8 backport] inspection: error on unsupported metadata versions #9229

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

neersighted
Copy link
Member

Backport #9203 to 1.8.


Resolves: #9195

This change also handles a previously unidentified bug. Previously, when processing wheel files, PackageInfo incorrectly
returned an empty instance. This change ensures a PackageInfoError is correctly raised. See 36bf325.

@neersighted
Copy link
Member Author

Note that this is without the test as it did not apply cleanly; let me know if you want me to try to bring it forward as well.

abn
abn previously approved these changes Mar 24, 2024
Copy link
Contributor

@jfly jfly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the if dist.metadata_version not in pkginfo.distribution.HEADER_ATTRS check that's a key piece of #9203. Is that intentionally omitted here?

Copy link
Contributor

@jfly jfly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't manually tested this version with my test harness, but the code LGTM!

src/poetry/inspection/info.py Outdated Show resolved Hide resolved
abn and others added 3 commits April 22, 2024 17:40
Previously, when processing wheel files, PackageInfo incorrectly
returned an empty instance. This change ensures a PackageInfoError
is correctly raised.

(cherry picked from commit 23612d4)
I thought this would be nice just to help people debug things in the
future.

(cherry picked from commit 8b9cf46)
@radoering radoering merged commit d033df4 into python-poetry:1.8 Apr 22, 2024
20 checks passed
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants