]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: improve accuracy of sqlite3 `check_same_thread` parameter (#101351)
authorMarcos Pereira <3464445+marcospgp@users.noreply.github.com>
Wed, 1 Feb 2023 23:52:29 +0000 (23:52 +0000)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2023 23:52:29 +0000 (00:52 +0100)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Doc/library/sqlite3.rst

index c0f0f133f4a286fa0f3d7f38291ae256b520d2cb..bbdc891c930cf4ae1ec528fb53f2deca5e3905fb 100644 (file)
@@ -302,10 +302,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,