[issue27861] sqlite3 type confusion and multiple frees

Serhiy Storchaka report at bugs.python.org
Sat Aug 27 14:02:55 EDT 2016


Serhiy Storchaka added the comment:

About the first bug. Checking that a factory is a subclass of sqlite3.Cursor is not enough. I suppose that a subclass of sqlite3.Cursor with overridden __new__ could pass the check but cause a crash.

    class BadCursor(sqlite3.Cursor):
        def __new__(cls, conn):
            return None

Docs should be changed as well as the code.

As for the second bug, please open a separate issue. This is more complex issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27861>
_______________________________________


More information about the Python-bugs-list mailing list