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

Reject bdist uploads containing inconsistent metadata #15884

Closed
pradyunsg opened this issue Apr 29, 2024 · 3 comments
Closed

Reject bdist uploads containing inconsistent metadata #15884

pradyunsg opened this issue Apr 29, 2024 · 3 comments
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue

Comments

@pradyunsg
Copy link
Contributor

What's the problem this feature will solve?
See https://pypi.org/project/triton/0.4.0/#files, which has 0.4.1 wheel names but (as the URL indicates), the wheels are actually for a 0.4.0 version.

This happened due to an incorrectly manipulated package by the author of the package (see triton-lang/triton#122) which resulted in an inconsistent version number being presented between the simple index and the project page.

Describe the solution you'd like

Such uploads should be blocked.

Additional context

None? I tried to look for duplicates and couldn't find any. Apologies if I missed something relevant!

@pradyunsg pradyunsg added feature request requires triaging maintainers need to do initial inspection of issue labels Apr 29, 2024
@woodruffw
Copy link
Member

Thanks for filing! Doing a bit of triage:

It's odd that PyPI accepted this at all, since the upload endpoint does check for consistency between the version in the wheel name and in the metadata:

if meta.version != version:
raise _exc_with_message(
HTTPBadRequest,
f"Version in filename should be {str(meta.version)!r} not "
f"{str(version)!r}.",
)

@woodruffw
Copy link
Member

woodruffw commented May 1, 2024

Oh hmm, triton==0.4.0 was uploaded in May 2021, and that check was added just a few weeks ago with #15795, fixing #15749.

So I think this is already fixed 🙂

@di
Copy link
Member

di commented May 1, 2024

Yeah, this is fixed.

@di di closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue
Projects
None yet
Development

No branches or pull requests

3 participants