Skip to content

Commit

Permalink
Add a comment as to why Metadata.name isn't normalized (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Oct 3, 2024
1 parent ce0d79c commit 28e7da7
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 28e7da7

Please sign in to comment.