diff options
author | chgnrdv <52372310+chgnrdv@users.noreply.github.com> | 2023-05-07 21:15:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 21:15:44 (GMT) |
commit | 06c2a4858b8806abc700a0471434067910db54ec (patch) | |
tree | 3a52fab053e06b01837db5c87732730e4c1dd2ea /Modules | |
parent | c0ece3dc9791694e960952ba74070efaaa79a676 (diff) | |
download | cpython-06c2a4858b8806abc700a0471434067910db54ec.zip cpython-06c2a4858b8806abc700a0471434067910db54ec.tar.gz cpython-06c2a4858b8806abc700a0471434067910db54ec.tar.bz2 |
gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (#104266)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_csv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index 0cde5c5..9ab2ad2 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -1000,7 +1000,7 @@ PyType_Spec Reader_Type_spec = { .name = "_csv.reader", .basicsize = sizeof(ReaderObj), .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | - Py_TPFLAGS_IMMUTABLETYPE), + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION), .slots = Reader_Type_slots }; @@ -1431,7 +1431,7 @@ PyType_Spec Writer_Type_spec = { .name = "_csv.writer", .basicsize = sizeof(WriterObj), .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | - Py_TPFLAGS_IMMUTABLETYPE), + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION), .slots = Writer_Type_slots, }; |