diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 1ace3bd..7a2a62b 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -458,13 +458,13 @@ pypi ``pypi`` for Python packages: - The default repository is ``https://pypi.org``. (Previously ``https://pypi.python.org``.) -- PyPI treats ``-`` and ``_`` as the same character and is not case sensitive. - Therefore a PyPI package ``name`` must be lowercased and underscore ``_`` - replaced with a dash ``-``. +- Per `PEP 503 `_, normalized PyPI package names should be + lowercased with all runs of the characters ``.``, ``-``, or ``_`` replaced with a single ``-`` character. - Examples:: pkg:pypi/django@1.11.1 pkg:pypi/django-allauth@12.23 + pkg:pypi/oslo-concurrency@4.5.0 rpm --- diff --git a/test-suite-data.json b/test-suite-data.json index a819fc8..b8de270 100644 --- a/test-suite-data.json +++ b/test-suite-data.json @@ -169,11 +169,11 @@ }, { "description": "pypi names have special rules and not case sensitive", - "purl": "pkg:PYPI/Django_package@1.11.1.dev1", - "canonical_purl": "pkg:pypi/django-package@1.11.1.dev1", + "purl": "pkg:PYPI/My.PyPI_.--._Package@1.11.1.dev1", + "canonical_purl": "pkg:pypi/my-pypi-package@1.11.1.dev1", "type": "pypi", "namespace": null, - "name": "django-package", + "name": "my-pypi-package", "version": "1.11.1.dev1", "qualifiers": null, "subpath": null,