Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1637c04
[WIP] PEP 814: Add built-in frozendict type
vstinner Nov 2, 2025
49aca48
Update Tools/build/generate_token.py for token.py
vstinner Nov 13, 2025
3299299
Try to fix build on Ubuntu and macOS
vstinner Nov 13, 2025
18ce520
Fix make check-c-globals
vstinner Nov 13, 2025
1a72eec
Add PyFrozenDict_Type to static_types
vstinner Nov 13, 2025
9d6ca58
Update Doc/library/stdtypes.rst
vstinner Nov 13, 2025
439c98c
Replace PyDict_Check() with _PyAnyDict_Check()
vstinner Nov 13, 2025
4a1a504
copy: support frozendict
vstinner Nov 13, 2025
302767b
Fix frozendict.__reduce_ex__()
vstinner Nov 13, 2025
07b3510
exec(): accept frozendict for globals
vstinner Nov 13, 2025
04f66ad
Make PyAnyDict_Check() public
vstinner Nov 13, 2025
6fca6d1
Optimize frozendict.copy()
vstinner Nov 14, 2025
6727967
Fix frozendict merge ("|=" operator); add tests
vstinner Nov 14, 2025
d231cdb
copy: use _copy_atomic_types instead; add tests
vstinner Nov 14, 2025
3a07c46
frozendict
vstinner Nov 14, 2025
bc25bb2
pprint supports frozendict
vstinner Nov 14, 2025
0acff5e
change json.tool._group_to_theme_color formatting
vstinner Nov 14, 2025
e90156e
json: use PyAnyDict_Check()
vstinner Nov 14, 2025
fe7e7f5
_pickle: fix refleak
vstinner Nov 14, 2025
4c5c8d2
frozendict_hash: use atomic load/store
vstinner Nov 14, 2025
0a57448
Update Lib/pydoc_data/topics.py
vstinner Nov 14, 2025
fc66056
Fix test_copy: remove duplicated test
vstinner Nov 17, 2025
c1f5055
frozendict | {} returns the same frozendict
vstinner Dec 12, 2025
6ff9c67
Fix frozendict_or()
vstinner Dec 12, 2025
9a64439
Moar frozendict|frozendict optimizations
vstinner Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add PyFrozenDict_Type to static_types
  • Loading branch information
vstinner committed Nov 13, 2025
commit 1a72eec987345c43e59a31930cf3f8626e520d6c
1 change: 1 addition & 0 deletions Include/internal/pycore_typeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern "C" {
#define _Py_TYPE_VERSION_BYTEARRAY 9
#define _Py_TYPE_VERSION_BYTES 10
#define _Py_TYPE_VERSION_COMPLEX 11
#define _Py_TYPE_VERSION_FROZENDICT 12

#define _Py_TYPE_VERSION_NEXT 16

Expand Down
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -7987,5 +7987,5 @@ PyTypeObject PyFrozenDict_Type = {
frozendict_new, /* tp_new */
PyObject_GC_Del, /* tp_free */
.tp_vectorcall = dict_vectorcall,
.tp_version_tag = _Py_TYPE_VERSION_DICT,
.tp_version_tag = _Py_TYPE_VERSION_FROZENDICT,
};
3 changes: 2 additions & 1 deletion Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -2476,8 +2476,9 @@ static PyTypeObject* static_types[] = {
&PyEnum_Type,
&PyFilter_Type,
&PyFloat_Type,
&PyFrame_Type,
&PyFrameLocalsProxy_Type,
&PyFrame_Type,
&PyFrozenDict_Type,
&PyFrozenSet_Type,
&PyFunction_Type,
&PyGen_Type,
Expand Down
Loading