Skip to content

Commit 28e7da7

Browse files
authored
Add a comment as to why Metadata.name isn't normalized (#842)
1 parent ce0d79c commit 28e7da7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/packaging/metadata.py

+2
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ def from_email(cls, data: bytes | str, *, validate: bool = True) -> Metadata:
735735
metadata_version: _Validator[_MetadataVersion] = _Validator()
736736
""":external:ref:`core-metadata-metadata-version`
737737
(required; validated to be a valid metadata version)"""
738+
# `name` is not normalized/typed to NormalizedName so as to provide access to
739+
# the original/raw name.
738740
name: _Validator[str] = _Validator()
739741
""":external:ref:`core-metadata-name`
740742
(required; validated using :func:`~packaging.utils.canonicalize_name` and its

0 commit comments

Comments
 (0)