diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-06-17 10:06:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 10:06:09 (GMT) |
commit | 00710e6346fd2394aa020b2dfae170093effac98 (patch) | |
tree | 8d75725f5d0774be997d3b8fedf08e262cf41b3f /Modules/_operator.c | |
parent | c544393b89f9b3e2b1a22588fc9ae58019314879 (diff) | |
download | cpython-00710e6346fd2394aa020b2dfae170093effac98.zip cpython-00710e6346fd2394aa020b2dfae170093effac98.tar.gz cpython-00710e6346fd2394aa020b2dfae170093effac98.tar.bz2 |
bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351)
* Make functools types immutable
* Multibyte codec types are now immutable
* pyexpat.xmlparser is now immutable
* array.arrayiterator is now immutable
* _thread types are now immutable
* _csv types are now immutable
* _queue.SimpleQueue is now immutable
* mmap.mmap is now immutable
* unicodedata.UCD is now immutable
* sqlite3 types are now immutable
* _lsprof.Profiler is now immutable
* _overlapped.Overlapped is now immutable
* _operator types are now immutable
* winapi__overlapped.Overlapped is now immutable
* _lzma types are now immutable
* _bz2 types are now immutable
* _dbm.dbm and _gdbm.gdbm are now immutable
Diffstat (limited to 'Modules/_operator.c')
-rw-r--r-- | Modules/_operator.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/_operator.c b/Modules/_operator.c index 5bd5a3b..d5e092e 100644 --- a/Modules/_operator.c +++ b/Modules/_operator.c @@ -1133,7 +1133,8 @@ static PyType_Spec itemgetter_type_spec = { .name = "operator.itemgetter", .basicsize = sizeof(itemgetterobject), .itemsize = 0, - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_IMMUTABLETYPE), .slots = itemgetter_type_slots, }; @@ -1464,7 +1465,8 @@ static PyType_Spec attrgetter_type_spec = { .name = "operator.attrgetter", .basicsize = sizeof(attrgetterobject), .itemsize = 0, - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_IMMUTABLETYPE), .slots = attrgetter_type_slots, }; @@ -1719,7 +1721,8 @@ static PyType_Spec methodcaller_type_spec = { .name = "operator.methodcaller", .basicsize = sizeof(methodcallerobject), .itemsize = 0, - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_IMMUTABLETYPE), .slots = methodcaller_type_slots, }; |