[Python-checkins] Docs: improve accuracy of sqlite3 `check_same_thread` parameter (GH-101351)

miss-islington webhook-mailer at python.org
Wed Feb 1 19:00:34 EST 2023


https://github.com/python/cpython/commit/c2c970fc26e6de5b9e338413eac71d46aea5ca5e
commit: c2c970fc26e6de5b9e338413eac71d46aea5ca5e
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2023-02-01T16:00:27-08:00
summary:

Docs: improve accuracy of sqlite3 `check_same_thread` parameter (GH-101351)

(cherry picked from commit ee21110086e277a0ac24f5f768f35847b4db3380)

Co-authored-by: Marcos Pereira <3464445+marcospgp at users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland at protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach at Gerlach.CAM>

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index ad5d063981f3..8a0d84d1c4b1 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -299,10 +299,13 @@ Module functions
    :type isolation_level: str | None
 
    :param bool check_same_thread:
-       If ``True`` (default), only the creating thread may use the connection.
-       If ``False``, the connection may be shared across multiple threads;
-       if so, write operations should be serialized by the user to avoid data
-       corruption.
+       If ``True`` (default), :exc:`ProgrammingError` will be raised
+       if the database connection is used by a thread
+       other than the one that created it.
+       If ``False``, the connection may be accessed in multiple threads;
+       write operations may need to be serialized by the user
+       to avoid data corruption.
+       See :attr:`threadsafety` for more information.
 
    :param Connection factory:
        A custom subclass of :class:`Connection` to create the connection with,



More information about the Python-checkins mailing list