From 944692cdf140fa876c4b6fbabf1461cc6b7ba55e Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 12 Feb 2026 02:24:41 +0900 Subject: [PATCH 1/4] PEP 814: Address feedback from SC --- peps/pep-0814.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/peps/pep-0814.rst b/peps/pep-0814.rst index 91ac0b3e649..4a51838e26a 100644 --- a/peps/pep-0814.rst +++ b/peps/pep-0814.rst @@ -251,7 +251,8 @@ Possible candidates for ``frozendict`` in the stdlib We have identified several stdlib modules where adopting ``frozendict`` can enhance safety and prevent unintended modifications by design. We also believe that there are additional potential use cases beyond the -ones listed below. +ones listed below. However, this does not mean that we intend to make +these changes without the approval of the respective module maintainers. Note: it remains possible to bind again a variable to a new modified ``frozendict`` or a new mutable ``dict``. @@ -362,15 +363,9 @@ Reference Implementation Thread Safety ============= -Once the ``frozendict`` is created, it is immutable and can be shared -safely between threads without any synchronization. - - -Future Work -=========== - -We are also going to make ``frozendict`` to be more efficient in terms -of memory usage and performance compared to ``dict`` in future. +Once a ``frozendict`` is created, its shallow immutability is guaranteed. +This means it can be safely shared between threads without synchronization, +as long as its values are not modified by other threads. Rejected Ideas From e0e58458e3bdc350047f7b962bb8ff32762cd798 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 12 Feb 2026 02:33:49 +0900 Subject: [PATCH 2/4] format --- peps/pep-0814.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0814.rst b/peps/pep-0814.rst index 4a51838e26a..ac3c13fb986 100644 --- a/peps/pep-0814.rst +++ b/peps/pep-0814.rst @@ -251,7 +251,7 @@ Possible candidates for ``frozendict`` in the stdlib We have identified several stdlib modules where adopting ``frozendict`` can enhance safety and prevent unintended modifications by design. We also believe that there are additional potential use cases beyond the -ones listed below. However, this does not mean that we intend to make +ones listed below. However, this does not mean that we intend to make these changes without the approval of the respective module maintainers. Note: it remains possible to bind again a variable to a new modified @@ -363,7 +363,7 @@ Reference Implementation Thread Safety ============= -Once a ``frozendict`` is created, its shallow immutability is guaranteed. +Once a ``frozendict`` is created, its shallow immutability is guaranteed. This means it can be safely shared between threads without synchronization, as long as its values are not modified by other threads. From a1cce751552e61331564a48407e0bbc30a32bcf2 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 12 Feb 2026 22:24:40 +0900 Subject: [PATCH 3/4] Address review --- peps/pep-0814.rst | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/peps/pep-0814.rst b/peps/pep-0814.rst index ac3c13fb986..68ed5dcc457 100644 --- a/peps/pep-0814.rst +++ b/peps/pep-0814.rst @@ -2,7 +2,7 @@ PEP: 814 Title: Add frozendict built-in type Author: Victor Stinner , Donghee Na Discussions-To: https://discuss.python.org/t/104854 -Status: Draft +Status: Accepted Type: Standards Track Created: 12-Nov-2025 Python-Version: 3.15 @@ -43,10 +43,6 @@ desirable: * Using an immutable mapping as a function parameter's default value avoids the problem of mutable default values. -* Immutable mappings can be used to safely share dictionaries across - thread and asynchronous task boundaries. The immutability makes it - easier to reason about threads and asynchronous tasks. - There are already third-party ``frozendict`` and ``frozenmap`` packages available on PyPI, proving that there is demand for immutable mappings. @@ -221,12 +217,6 @@ Passing a ``frozendict`` to ``PyDict_SetItem()`` or ``PyDict_DelItem()`` fails with ``TypeError``. ``PyDict_Check()`` on a ``frozendict`` is false. -Exposing the C API helps authors of C extensions supporting -``frozendict`` when they need to support thread-safe immutable -containers. It will be important since -:pep:`779` (Criteria for supported status for free-threaded Python) was -accepted, people need this for their migration. - Differences between ``dict`` and ``frozendict`` =============================================== From fc78cceffffdef252427bda8fe56d4fd9efa0135 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 12 Feb 2026 22:53:43 +0900 Subject: [PATCH 4/4] Address review --- peps/pep-0814.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/peps/pep-0814.rst b/peps/pep-0814.rst index 68ed5dcc457..45648734d0d 100644 --- a/peps/pep-0814.rst +++ b/peps/pep-0814.rst @@ -7,6 +7,7 @@ Type: Standards Track Created: 12-Nov-2025 Python-Version: 3.15 Post-History: `13-Nov-2025 `__ +Resolution: `11-Feb-2026 `__ Abstract