From beb8e3f2763d35ed85ae4bb82ef0073dfaaa3a67 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 Feb 2026 22:13:16 +0100 Subject: [PATCH] gh-141510: Document ParameterizedMIMEHeader.params change (#145003) Document also the dataclasses.field() metadata change. --- Doc/library/dataclasses.rst | 4 ++++ Doc/library/email.headerregistry.rst | 4 ++++ .../Library/2026-02-19-16-26-08.gh-issue-141510.4Qxy8_.rst | 3 +++ .../Library/2026-02-19-18-02-54.gh-issue-141510.qzvYsO.rst | 3 +++ 4 files changed, 14 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-02-19-16-26-08.gh-issue-141510.4Qxy8_.rst create mode 100644 Misc/NEWS.d/next/Library/2026-02-19-18-02-54.gh-issue-141510.qzvYsO.rst diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index cff36e25822..2864149a08f 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -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 diff --git a/Doc/library/email.headerregistry.rst b/Doc/library/email.headerregistry.rst index ff8b601fe3d..f4c11821c4b 100644 --- a/Doc/library/email.headerregistry.rst +++ b/Doc/library/email.headerregistry.rst @@ -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 index 00000000000..cf22e82b841 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-02-19-16-26-08.gh-issue-141510.4Qxy8_.rst @@ -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 index 00000000000..ae46ff0cbdd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-02-19-18-02-54.gh-issue-141510.qzvYsO.rst @@ -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.