Deprecating sqlite object reinitialization

I think the discussion has wandered off a bit and is no longer about what to do
about the sqlite3 module, specifically.

I just wanted to add some more insights on why we have two different APIs for
the object creation phase and what the intended use of these APIs is, since
there appears to be some misunderstanding.

For sqlite3, it’s only important that calling methods doesn’t result in a
segfault. I don’t know the details of the sqlite3 .__init__() method, but
perhaps you could add a check whether it was called already and raise an
exception of it is called twice.

I know from mxODBC that all other methods will have to check whether the
database connection or cursor is still usable before starting with processing
the request, so I guess sqlite3 will have to do the same.

1 Like