Created
October 13, 2020 15:45
-
-
Save Chaz6/bea6fc23182fdc4a043286afb51488be to your computer and use it in GitHub Desktop.
Patch to support current SQLlite with Python 3.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Python-3.9.0/Modules/_sqlite/connection.c.old 2020-10-05 16:07:58.000000000 +0100 | |
+++ Python-3.9.0/Modules/_sqlite/connection.c 2020-10-13 16:40:28.161985539 +0100 | |
@@ -1063,10 +1063,10 @@ | |
if (trace_callback == Py_None) { | |
/* None clears the trace callback previously set */ | |
- sqlite3_trace(self->db, 0, (void*)0); | |
+ sqlite3_trace_v2(self->db, SQLITE_TRACE_STMT, 0, (void*)0); | |
Py_XSETREF(self->function_pinboard_trace_callback, NULL); | |
} else { | |
- sqlite3_trace(self->db, _trace_callback, trace_callback); | |
+ sqlite3_trace_v2(self->db, SQLITE_TRACE_STMT, _trace_callback, trace_callback); | |
Py_INCREF(trace_callback); | |
Py_XSETREF(self->function_pinboard_trace_callback, trace_callback); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment