From 28e7da78f6f73b4856260e24051b35a4517c0149 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 3 Oct 2024 14:39:37 -0700 Subject: [PATCH] Add a comment as to why `Metadata.name` isn't normalized (#842) --- src/packaging/metadata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/packaging/metadata.py b/src/packaging/metadata.py index 8ec55a8e..23157ce7 100644 --- a/src/packaging/metadata.py +++ b/src/packaging/metadata.py @@ -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