8000 Extend twine check to fail on all reasons for which pypi.org would reject a package · Issue #1152 · pypa/twine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Extend twine check to fail on all reasons for which pypi.org would reject a package #1152
Open
@mauvilsa

Description

@mauvilsa

Is there an existing issue for this?

  • I have searched the existing issues (open and closed), and could not find an existing issue

What keywords did you use to search existing issues?

twine check

Please describe the problem you are attempting to solve with this request

Use twine check to know early enough (pre-commit hook) if an upload of a package to https://pypi.org/ will succeed or fail.

How do you think we should solve this?

twine check should ideally fail for all possible reasons that https://pypi.org/ would reject a package. Or at least the ones that can be determined from the package alone.

Anything else you'd like to mention?

In the past I had a problem uploading a package to pypi, after which I realized that twine check would have already told me that the package was going to be rejected. So I added twine check in a pre-commit hook to avoid this happening again. Unfortunately, it happened again, but this time the package passed with twine check.

Today looking at the docs I see the description of twine check being "Checks whether your distribution’s long description will render correctly on PyPI". On one hand, not great that when I run twine check --help there is no such description. On the other hand, it seems quite misleading that check is only for "long description". I don't know if the original idea was to extend check more and more, and it was never done. Or it has been done and the docs don't say it.

The reason why my package was rejected is:

ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/        
         Can't have direct dependency: jsonnet@                                 
         https://github.com/google/jsonnet/zipball/master ; python_version ==   
         "3.13" and extra == "jsonnet". See                                     
         https://packaging.python.org/specifications/core-metadata for more     
         information.

For reference, this relates to google/jsonnet#1172.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0