https://github.com/python/cpython/commit/e779777c66595acc599162fc3c852f3cda3f5c45
commit: e779777c66595acc599162fc3c852f3cda3f5c45
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-02-17T23:03:22+01:00
summary:
gh-141510: Mention frozendict in dict documentation (#144934)
test_genericalias now tests also frozendict.
files:
M Doc/library/stdtypes.rst
M Lib/pydoc_data/topics.py
M Lib/test/test_genericalias.py
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 6f798f02e17899..a8f693f4879025 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -5590,8 +5590,8 @@ can be used interchangeably to index the same dictionary
entry.
.. seealso::
- :class:`types.MappingProxyType` can be used to create a read-only view
- of a :class:`dict`.
+ :class:`frozendict` and :class:`types.MappingProxyType` can be used to
+ create a read-only view of a :class:`dict`.
.. _thread-safety-dict:
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index 32cf9a995bae3d..dc09c5fd47affe 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -3676,8 +3676,8 @@ def f() -> annotation: ...
* a class that inherits from any of the above
- The standard library classes "dict" and "types.MappingProxyType"
- are mappings.
+ The standard library classes "dict", "frozendict"
+ and "types.MappingProxyType" are mappings.
[4] A string literal appearing as the first statement in the function
body is transformed into the function’s "__doc__" attribute and
@@ -13620,8 +13620,8 @@ class dict(iterable, /, **kwargs)
See also:
- "types.MappingProxyType" can be used to create a read-only view of a
- "dict".
+ "frozendict" and "types.MappingProxyType" can be used to create a read-only
+ view of a "dict".
Dictionary view objects
diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py
index 2b9cee6433b5b8..a5969b7a47d948 100644
--- a/Lib/test/test_genericalias.py
+++ b/Lib/test/test_genericalias.py
@@ -101,7 +101,8 @@
class BaseTest(unittest.TestCase):
"""Test basics."""
- generic_types = [type, tuple, list, dict, set, frozenset, enumerate,
memoryview,
+ generic_types = [type, tuple, list, dict, frozendict,
+ set, frozenset, enumerate, memoryview,
slice,
defaultdict, deque,
SequenceMatcher,
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]