Skip to content

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

Merged
radoering merged 3 commits intopython-poetry:1.8from
neersighted:backport/9203-1.8
Apr 22, 2024
Merged

[1.8 backport] inspection: error on unsupported metadata versions#9229
radoering merged 3 commits intopython-poetry:1.8from
neersighted:backport/9203-1.8

Conversation

@neersighted
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

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 enabled auto-merge (rebase) April 22, 2024 16:03
@radoering radoering merged commit d033df4 into python-poetry:1.8 Apr 22, 2024
@github-actions
Copy link
Copy Markdown

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