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

Clarify filename rules in wheel spec #845

Merged
merged 1 commit into from
Feb 28, 2021
Merged
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
8 changes: 5 additions & 3 deletions source/specifications/binary-distribution-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,14 @@ this character cannot appear within any component. This is handled as follows:
- In distribution names, any run of ``-_.`` characters (HYPHEN-MINUS, LOW LINE
and FULL STOP) should be replaced with ``_`` (LOW LINE). This is equivalent
to :pep:`503` normalisation followed by replacing ``-`` with ``_``.
- Version numbers should be normalised according to :pep:`440`, and then ``-``
characters should be replaced with ``_`` (LOW LINE). Normalised version
numbers cannot contain ``_``, so the replacement does not lose information.
- Version numbers should be normalised according to :pep:`440`. Normalised
version numbers cannot contain ``-``.
- The remaining components may not contain ``-`` characters, so no escaping
is necessary.

Tools producing wheels should verify that the filename components do not contain
Copy link
Member Author

Choose a reason for hiding this comment

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

I worded this as a recommendation rather than a requirement, because it's about how tools achieve a required result.

``-``, as the resulting file may not be processed correctly if they do.

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
this specification.
Expand Down