]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141510: Document ParameterizedMIMEHeader.params change (#145003)
authorVictor Stinner <vstinner@python.org>
Thu, 19 Feb 2026 21:13:16 +0000 (22:13 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Feb 2026 21:13:16 +0000 (22:13 +0100)
Document also the dataclasses.field() metadata change.

Doc/library/dataclasses.rst
Doc/library/email.headerregistry.rst
Misc/NEWS.d/next/Library/2026-02-19-16-26-08.gh-issue-141510.4Qxy8_.rst [new file with mode: 0644]
Misc/NEWS.d/next/Library/2026-02-19-18-02-54.gh-issue-141510.qzvYsO.rst [new file with mode: 0644]

index cff36e258224d343af7d16de6323b61056933eca..2864149a08fd50a0cc8c8407095db4d01c2f6a4e 100644 (file)
@@ -333,6 +333,10 @@ Module contents
    :attr:`!C.t` will be ``20``, and the class attributes :attr:`!C.x` and
    :attr:`!C.y` will not be set.
 
+   .. versionchanged:: next
+      If *metadata* is ``None``, use an empty :class:`frozendict`, instead
+      of a :func:`~types.MappingProxyType` of an empty :class:`dict`.
+
 .. class:: Field
 
    :class:`!Field` objects describe each defined field. These objects
index ff8b601fe3d1bb159e8bed8b39780a8bbd8b3f28..f4c11821c4b91d90dc745a51798e5ba9a582997d 100644 (file)
@@ -269,6 +269,10 @@ variant, :attr:`~.BaseHeader.max_count` is set to 1.
 
        A dictionary mapping parameter names to parameter values.
 
+       .. versionchanged:: next
+          It is now a :class:`frozendict` instead of a
+          :class:`types.MappingProxyType`.
+
 
 .. class:: ContentTypeHeader
 
diff --git a/Misc/NEWS.d/next/Library/2026-02-19-16-26-08.gh-issue-141510.4Qxy8_.rst b/Misc/NEWS.d/next/Library/2026-02-19-16-26-08.gh-issue-141510.4Qxy8_.rst
new file mode 100644 (file)
index 0000000..cf22e82
--- /dev/null
@@ -0,0 +1,3 @@
+``ParameterizedMIMEHeader.params`` of :mod:`email.headerregistry` is now a
+:class:`frozendict` instead of a :class:`types.MappingProxyType`. Patch by
+Victor Stinner.
diff --git a/Misc/NEWS.d/next/Library/2026-02-19-18-02-54.gh-issue-141510.qzvYsO.rst b/Misc/NEWS.d/next/Library/2026-02-19-18-02-54.gh-issue-141510.qzvYsO.rst
new file mode 100644 (file)
index 0000000..ae46ff0
--- /dev/null
@@ -0,0 +1,3 @@
+:func:`dataclasses.field`: if *metadata* is ``None``, use an empty
+:class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an
+empty :class:`dict`. Patch by Victor Stinner.