diff --git a/Misc/NEWS.d/next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst b/Misc/NEWS.d/next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst new file mode 100644 index 00000000000000..a8815edda0e8ab --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst @@ -0,0 +1 @@ +:attr:`sqlite3.threadsafety` property temporarily aligned with effective module capabilities. Currently, only the module can be used by multiple threads. diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 698e81d9b897d0..2d842e7606f559 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -528,8 +528,8 @@ get_threadsafety(pysqlite_state *state) switch (mode) { case 0: // Single-thread mode; threads may not share the module. return 0; - case 1: // Serialized mode; threads may share the module, - return 3; // connections, and cursors. + case 1: // Serialized mode; until #118172 is fixed, is the same as + return 1; // Multi-thread mode. case 2: // Multi-thread mode; threads may share the module, but not return 1; // connections. default: