From a49483cf2c2fb13f76ba022537a7830fed379c86 Mon Sep 17 00:00:00 2001 From: Riccardo Ghetta <8450123+rghe@users.noreply.github.com> Date: Sun, 22 Sep 2024 18:25:30 +0200 Subject: [PATCH 1/3] gh-123873: sqlite3.threadsafety aligned with python module capabilities --- Modules/_sqlite/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: From e5f152e879623f18692a8df49fc6a4b14deafb2f Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:16:09 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst 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..3ecbe175b75393 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst @@ -0,0 +1 @@ +SQLite3 threadsafe property aligned with effective module capabilities. Currently only the module can be used by multiple threads From 56a88e000e4ff4809c285bd4675bb4b1a75f4ccd Mon Sep 17 00:00:00 2001 From: Riccardo Ghetta Date: Mon, 23 Sep 2024 18:45:07 +0200 Subject: [PATCH 3/3] Update Misc/NEWS.d/next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst Co-authored-by: Peter Bierma --- .../next/Library/2024-09-23-16-16-06.gh-issue-123873.rzdy2x.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 3ecbe175b75393..a8815edda0e8ab 100644 --- 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 @@ -1 +1 @@ -SQLite3 threadsafe property aligned with effective module capabilities. Currently only the module can be used by multiple threads +:attr:`sqlite3.threadsafety` property temporarily aligned with effective module capabilities. Currently, only the module can be used by multiple threads.