Skip to content
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

PEP 427: Amend wheel's filename escaping rules #1824

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions pep-0427.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Status: Final
Type: Standards Track
Content-Type: text/x-rst
Created: 20-Sep-2012
Post-History: 18-Oct-2012, 15-Feb-2013
Post-History: 18-Oct-2012, 15-Feb-2013, 20-Feb-2021
Resolution: https://mail.python.org/pipermail/python-dev/2013-February/124103.html

Abstract
Expand Down Expand Up @@ -158,10 +158,10 @@ package's basic interpreter requirements and are detailed in PEP 425.
Escaping and Unicode
''''''''''''''''''''

Each component of the filename is escaped by replacing runs of
non-alphanumeric characters with an underscore ``_``::

re.sub("[^\w\d.]+", "_", distribution, re.UNICODE)
The ``distribution`` and ``version`` components of the filename should
follow the same rules as the ``.dist-info`` directory. [2]_ Each
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good practice for specifications to contain their own definitions with minimal references to other documents, even if that means some duplication. E.g. if something changed about dist-info directories, it may be unclear whether the change also affects wheel filenames. Admittedly this is somewhat pedantic!

component is then escaped by replacing each dash ``-`` with an
underscore ``_``.

The archive filename is Unicode. It will be some time before the tools
are updated to support non-ASCII filenames, but they are supported in
Expand Down Expand Up @@ -447,6 +447,9 @@ References
.. [1] PEP acceptance
(https://mail.python.org/pipermail/python-dev/2013-February/124103.html)

.. [2] Recording installed projects
(https://packaging.python.org/specifications/recording-installed-packages/)


Appendix
========
Expand Down