Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-21150

Support the "data-requires-python" attribute in the PyPi proxy simple index page

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: PyPI
    • Labels:
      None

      Description

      The official PyPi repository adds a ''data-requires-python" attribute to all packages that contain a "requires_python" statement in their setup.py file.

      As an example, see Django packages: [https://pypi.org/simple/django/]

      Newer packages have "data-requires-python='>=3.5'" set on each link. This allows pip to find the most suitable Python package for the version of Python that's currently running.

      Currently Nexus ignores this attribute. If you visit a Nexus PyPi proxy for Django, then none of the links contain a `data-requires-python` attribute and so running 'pip install django' on 2.7 will cause it to install a version of Django that only works in Python 3.

      This is causing major issues for us during our switch from Python 2 to Python 3, as a lot of packages are now publishing versions that do not support Python 2. For any of these packages, when using Nexus as a PyPi proxy, will cause installations to fail.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              orf Tom Forbes
              Last Updated By:
              Fedor Tarasenko Fedor Tarasenko
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title