Skip to content

Requires-Python information not uploaded to PyPI? #4936

@pganssle

Description

@pganssle

Problem

Although Sphinx has added requires_python into its setup() function, I believe the current versions up there now were uploaded using an old version of twine or built with an old version of setuptools, because the Requires-Python metadata does not seem to be present.

I am erroneously installing Sphinx on Python 3.3 for this project, and it is causing a failure because it is downloading an unsupported version.

If you compare python-dateutil to sphinx on PyPI, you'll see that Sphinx is missing the "Requires: Python >=2.7, !=3.0., !=3.1., !=3.2., !=3.3." text below the list of maintainers.

Solution

I think the solution here is to issue new releases for all affected versions (possibly post releases), going back to the last one that supports Python 3.3, using an upgraded version of twine and setuptools. Simply issuing a single new release with this problem fixed will not solve the problem, because pip will choose the most recent version that doesn't explicitly exclude Python 3.3 in the metadata and download that - which means all the existing releases won't be excluded.

Word of Warning:
You cannot re-publish a module you un-publish, so I recommend uploading post releases for the affected versions and test that with pip >= 8.0 on Python 3.3. If pip still ends up picking up the non-post releases, you may have to un-publish the non-post versions, assuming that still matches exact strings like Sphinx==1.7.3.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions