Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7296598 commit d104f4dCopy full SHA for d104f4d
2 files changed
Lib/test/test_sqlite3/test_dbapi.py
@@ -356,6 +356,7 @@ def test_shared_cache_deprecated(self):
356
def test_disallow_instantiation(self):
357
cx = sqlite.connect(":memory:")
358
check_disallow_instantiation(self, type(cx("select 1")))
359
+ check_disallow_instantiation(self, sqlite.Blob)
360
361
def test_complete_statement(self):
362
self.assertFalse(sqlite.complete_statement("select t"))
Modules/_sqlite/blob.c
@@ -334,7 +334,7 @@ static PyType_Spec blob_spec = {
334
.name = MODULE_NAME ".Blob",
335
.basicsize = sizeof(pysqlite_Blob),
336
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
337
- Py_TPFLAGS_IMMUTABLETYPE),
+ Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION),
338
.slots = blob_slots,
339
};
340
0 commit comments