-
Notifications
You must be signed in to change notification settings - Fork 308
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
Twine check fails to warn on invalid classifier #976
Comments
Spiritually I think this is a duplicate of #430. Regardless it's part of the overall theme of "twine doesn't check things that we have to reimplement because PyPI doesn't have a shared library with these validations" |
@sigmavirus24 You may have missed that PyPI now has a shared library for classifiers with https://github.com/pypa/trove-classifiers which is also used in warehouse since @di merged it in pypi/warehouse#7582 ? |
@pombredanne I wasn't aware of that library, which I think does re-open the door for implementing this in Twine. That said, there's been a lot of discussion about how to add That said: given that PyPI rejects the upload, I guess I'm not sure how much value there is in adding it to |
@bhrutledge Thanks for reopening! You wrote:
FWIW, the problem for me is that when PyPI rejects an upload, it is too late: the code has already been validated, tests have run, the repo is tagged, a release has been created and wheels/sdist built, typically all automatically from a tag. A failure to upload means I need to update classifiers and respin a mostly ugly dot release for the sole purpose of fixing the classifiers. And I eventually want to yank the previous release or tag so there is no dangling tag that's not published to PyPI. I would much prefer a twine check failing during a test run in the CI. |
Many people will create a pre-release tag that will upload to Test PyPI. Then you can make changes before making a final release. This too can be automated the same way your normal release flow is. You can even see if it uploads to Test PyPI and then optionally release to PyPI as well for people to install and test from if you want. This doesn't need to be solved by Twine. There is far too much warehouse checks that we cannot and every inch we move towards doing that, is more maintenance burden and momentum we have to resist reimplementing (poorly) those checks. (Especially since Warehouse doesn't externalize those often or ever) |
@pombredanne Thanks for the details of your scenario. That makes sense, and I see how an upload failure is cumbersome.
This occurred to me as well. Even if we enhance
I think this is the most robust solution, though it would require re-working your release automation. I think you could even upload a pre-release to PyPI. |
Unless it's changed significantly since it was implemented, the README validation is the same as PyPI does on upload.
I agree, and this is precisely the use case for
The current plan is to externalize them into a reusable library, it just hasn't happened yet: pypa/packaging#147 |
I've just been bitten by this issue. As the conversation seems to indicate that it would be a welcome addition, I went ahead with: #1166 |
Your Environment
Using twine:
I have a setup.cfg with this classifier:
Development Status :: 4 - Beta
there is an extra space before the
4
If I build a wheel and run
twine check
, it passes (see attached wheel where the .zip extension has been added to make this tracker happy)tracecode_toolkit_strace-0.21.0-py3-none-any.whl.zip
If I try to upload this to PyPI I get this error:
I would expect the check to fail if the upload would fail.
The text was updated successfully, but these errors were encountered: