hydroflask <hydrofl...@yqxmail.com> added the comment:

> All callbacks triggered from external libraries must protect Python C API 
> calls. You may call it offending, but that is the reality; a callback may 
> trigger at any point in time, so we need to make sure the GIL is held before 
> calling any Py API. That is also the case for the destructor.

Sure but I'm suggesting sidestepping and not using the destructor_callback 
entirely. You can DECREF the callbacks manually in connection_close() after 
calling sqlite3_close_v2(). Doing this makes sense to me since the destructor 
may be called under special conditions.

----------

_______________________________________
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