From 889228f5bd445c30ae67387b7e17e59216a43d00 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 18 Mar 2026 14:16:46 +0100 Subject: [PATCH] gh-141510: Document isinstance change for frozendict in What's New --- Doc/whatsnew/3.15.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 7d5c6e224789be..5689ecbffc4b30 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -221,6 +221,11 @@ The following standard library modules have been updated to accept :func:`eval` and :func:`exec` accept :class:`!frozendict` for *globals*, and :func:`type` and :meth:`str.maketrans` accept :class:`!frozendict` for *dict*. +Code checking for :class:`dict` type using ``isinstance(arg, dict)`` can be +updated to ``isinstance(arg, (dict, frozendict))`` to accept also the +:class:`!frozendict` type, or to ``isinstance(arg, collections.abc.Mapping)`` +to accept also other mapping types such as :class:`~types.MappingProxyType`. + .. seealso:: :pep:`814` for the full specification and rationale. (Contributed by Victor Stinner and Donghee Na in :gh:`141510`.)