summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-06-17 10:06:09 (GMT)
committerGitHub <noreply@github.com>2021-06-17 10:06:09 (GMT)
commit00710e6346fd2394aa020b2dfae170093effac98 (patch)
tree8d75725f5d0774be997d3b8fedf08e262cf41b3f /Modules/_sqlite
parentc544393b89f9b3e2b1a22588fc9ae58019314879 (diff)
downloadcpython-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/_sqlite')
-rw-r--r--Modules/_sqlite/connection.c3
-rw-r--r--Modules/_sqlite/cursor.c3
-rw-r--r--Modules/_sqlite/prepare_protocol.c3
-rw-r--r--Modules/_sqlite/row.c3
-rw-r--r--Modules/_sqlite/statement.c3
5 files changed, 10 insertions, 5 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 915515c..e1eef58 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -1914,7 +1914,8 @@ static PyType_Slot connection_slots[] = {
static PyType_Spec connection_spec = {
.name = MODULE_NAME ".Connection",
.basicsize = sizeof(pysqlite_Connection),
- .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 = connection_slots,
};
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 8c8a347..8e7d65f 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -1078,7 +1078,8 @@ static PyType_Slot cursor_slots[] = {
static PyType_Spec cursor_spec = {
.name = MODULE_NAME ".Cursor",
.basicsize = sizeof(pysqlite_Cursor),
- .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 = cursor_slots,
};
diff --git a/Modules/_sqlite/prepare_protocol.c b/Modules/_sqlite/prepare_protocol.c
index 1f9d7b7..cefb46e 100644
--- a/Modules/_sqlite/prepare_protocol.c
+++ b/Modules/_sqlite/prepare_protocol.c
@@ -56,7 +56,8 @@ static PyType_Slot type_slots[] = {
static PyType_Spec type_spec = {
.name = MODULE_NAME ".PrepareProtocol",
.basicsize = sizeof(pysqlite_PrepareProtocol),
- .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+ Py_TPFLAGS_IMMUTABLETYPE),
.slots = type_slots,
};
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index bf43dad..d2f9bdd 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -258,7 +258,8 @@ static PyType_Slot row_slots[] = {
static PyType_Spec row_spec = {
.name = MODULE_NAME ".Row",
.basicsize = sizeof(pysqlite_Row),
- .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 = row_slots,
};
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index 89fe4bb..3960b21 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -502,7 +502,8 @@ static PyType_Slot stmt_slots[] = {
static PyType_Spec stmt_spec = {
.name = MODULE_NAME ".Statement",
.basicsize = sizeof(pysqlite_Statement),
- .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+ Py_TPFLAGS_IMMUTABLETYPE),
.slots = stmt_slots,
};