]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-141510, PEP 814: Add built-in frozendict type (#144757)
authorVictor Stinner <vstinner@python.org>
Tue, 17 Feb 2026 09:54:41 +0000 (10:54 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Feb 2026 09:54:41 +0000 (10:54 +0100)
commit696cdfc0a25aa4f1ba200464bd710ff54a261a78
treece7e58485574ab1cb9b7145437edb63c3655ba7d
parent63531a3867cf4f8b5a7088fb7667d33534c43ff7
gh-141510, PEP 814: Add built-in frozendict type (#144757)

Add TYPE_FROZENDICT to the marshal module.

Add C API functions:

* PyAnyDict_Check()
* PyAnyDict_CheckExact()
* PyFrozenDict_Check()
* PyFrozenDict_CheckExact()
* PyFrozenDict_New()

Add PyFrozenDict_Type C type.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
18 files changed:
Doc/c-api/dict.rst
Doc/library/stdtypes.rst
Doc/whatsnew/3.15.rst
Include/cpython/dictobject.h
Include/internal/pycore_dict.h
Include/internal/pycore_typeobject.h
Lib/_collections_abc.py
Lib/test/mapping_tests.py
Lib/test/test_dict.py
Lib/test/test_doctest/test_doctest.py
Lib/test/test_inspect/test_inspect.py
Misc/NEWS.d/next/C_API/2026-02-12-19-03-31.gh-issue-141510.U_1tjz.rst [new file with mode: 0644]
Misc/NEWS.d/next/Core_and_Builtins/2026-02-12-19-01-13.gh-issue-141510.KlKjZg.rst [new file with mode: 0644]
Objects/dictobject.c
Objects/object.c
Python/bltinmodule.c
Python/marshal.c
Tools/c-analyzer/cpython/ignored.tsv