Skip to content

Commit

Permalink
Add a comment as to why Metadata.name isn't normalized
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Oct 3, 2024
1 parent ce0d79c commit 8bcc2c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/packaging/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,8 @@ def from_email(cls, data: bytes | str, *, validate: bool = True) -> Metadata:
metadata_version: _Validator[_MetadataVersion] = _Validator()
""":external:ref:`core-metadata-metadata-version`
(required; validated to be a valid metadata version)"""
# `name` is not normalized/typed to NormalizedName so as to provide access to
# the original/raw name.
name: _Validator[str] = _Validator()
""":external:ref:`core-metadata-name`
(required; validated using :func:`~packaging.utils.canonicalize_name` and its
Expand Down

0 comments on commit 8bcc2c7

Please # to comment.