Erlend E. Aasland <erlend.aasl...@innova.no> added the comment:

> My recommended fix is to call sqlite3_close() within 
> Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS, and manually Py_DECREF all 
> connection-related functions afterward.

3.11 already drops the GIL before sqlite3_close_v2(); backporting this change 
to 3.10 results in the following assertion error:

    $ ./python.exe sqlite3_fatal_python_error.py  
    Assertion failed: (!_PyMem_IsPtrFreed(tstate->interp)), function 
is_tstate_valid, file ceval.c, line 155.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47019>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to