diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-17 10:19:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 10:19:44 (GMT) |
commit | 7297d74251de3b1c02dcdb9ca281461cc7fb4535 (patch) | |
tree | 1f5e034feafd8006b0eb5f73b618a5da3e974274 /Modules/_csv.c | |
parent | 08f2b9dedea13d2e9d11c189914387db3a66e2ca (diff) | |
download | cpython-7297d74251de3b1c02dcdb9ca281461cc7fb4535.zip cpython-7297d74251de3b1c02dcdb9ca281461cc7fb4535.tar.gz cpython-7297d74251de3b1c02dcdb9ca281461cc7fb4535.tar.bz2 |
bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)
* 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
(cherry picked from commit 00710e6346fd2394aa020b2dfae170093effac98)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Diffstat (limited to 'Modules/_csv.c')
-rw-r--r-- | Modules/_csv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index a213734..78855b8 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -537,7 +537,8 @@ static PyType_Slot Dialect_Type_slots[] = { PyType_Spec Dialect_Type_spec = { .name = "_csv.Dialect", .basicsize = sizeof(DialectObj), - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_IMMUTABLETYPE), .slots = Dialect_Type_slots, }; @@ -958,7 +959,8 @@ static PyType_Slot Reader_Type_slots[] = { PyType_Spec Reader_Type_spec = { .name = "_csv.reader", .basicsize = sizeof(ReaderObj), - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_IMMUTABLETYPE), .slots = Reader_Type_slots }; @@ -1382,7 +1384,8 @@ static PyType_Slot Writer_Type_slots[] = { PyType_Spec Writer_Type_spec = { .name = "_csv.writer", .basicsize = sizeof(WriterObj), - .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_IMMUTABLETYPE), .slots = Writer_Type_slots, }; |