diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-06-03 18:38:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 09:38:19 -0700 |
commit | d88b47b5a396aa8d66f9a0e6b13a0825d59d0eff (patch) | |
tree | d932a399ff6b69078f5a0bf5874b4e7e438a6b69 /Modules/_sqlite/connection.c | |
parent | 2c1e2583fdc4db6b43d163239ea42b0e8394171f (diff) | |
download | cpython-d88b47b5a396aa8d66f9a0e6b13a0825d59d0eff.tar.gz cpython-d88b47b5a396aa8d66f9a0e6b13a0825d59d0eff.zip |
bpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)
The sqlite3 module now fully implements the GC protocol, so there's no
need for this workaround anymore.
- Add and use managed resource helper for connections using TESTFN
- Sort test imports
- Split open-tests into their own test case
Automerge-Triggered-By: GH:vstinner
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r-- | Modules/_sqlite/connection.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 62c4dc3bbb3..c1a5677d490 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -149,14 +149,6 @@ pysqlite_connection_init(pysqlite_Connection *self, PyObject *args, return -1; } - /* By default, the Cache class INCREFs the factory in its initializer, and - * decrefs it in its deallocator method. Since this would create a circular - * reference here, we're breaking it by decrementing self, and telling the - * cache class to not decref the factory (self) in its deallocator. - */ - self->statement_cache->decref_factory = 0; - Py_DECREF(self); - self->detect_types = detect_types; self->timeout = timeout; (void)sqlite3_busy_timeout(self->db, (int)(timeout*1000)); |