You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sqlite: Handle state invalidation when Connection.__init__ fails during re-initialization #6287
Currently, sqlite3 does not correctly update the internal state of a Connection object if __init__ is called a second time and fails (e.g., due to an OperationalError).
Expected Behavior
If Connection.__init__ fails (even on an already open connection), the object should be considered uninitialized. Subsequent attempts to use methods like executemany should raise a sqlite3.ProgrammingError with the message "Base Connection.init not called", matching CPython's behavior.
Context
This behavior is required to pass test_connection_bad_reinit. We need to ensure the connection's initialized flag is reset or checked properly when re-initialization fails.
Activity