I believe it is fully possible to verify that reinitialisation will work fine for sqlite3.Connection
(and sqlite3.Cursor
). There’s only a handful of methods in sqlite3.Cursor
, and a dozen or so (from the top of my head) methods in sqlite3.Connection
to audit.
IIRC, this is needed (given that connection __init__
is cleaned up a la GH-28227):
- all connection and cursor methods must check that they operate on a fully initialised object
- all connection and cursor methods must fail gracefully when the database pointer is
NULL
- all cursor methods must fail gracefully when the statement pointer is
NULL
IIRC, most of these conditions are already in place.
+1
I totally agree