mirror of
https://github.com/python/cpython
synced 2024-10-14 15:42:19 +00:00
gh-69093: Don't allow instantiation of sqlite3.Blob objects (GH-91570)
This commit is contained in:
parent
72965981d1
commit
d104f4d21f
|
@ -356,6 +356,7 @@ def test_shared_cache_deprecated(self):
|
|||
def test_disallow_instantiation(self):
|
||||
cx = sqlite.connect(":memory:")
|
||||
check_disallow_instantiation(self, type(cx("select 1")))
|
||||
check_disallow_instantiation(self, sqlite.Blob)
|
||||
|
||||
def test_complete_statement(self):
|
||||
self.assertFalse(sqlite.complete_statement("select t"))
|
||||
|
|
|
@ -334,7 +334,7 @@ static PyType_Spec blob_spec = {
|
|||
.name = MODULE_NAME ".Blob",
|
||||
.basicsize = sizeof(pysqlite_Blob),
|
||||
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_IMMUTABLETYPE),
|
||||
Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION),
|
||||
.slots = blob_slots,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue