]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 3 Oct 2023 16:02:44 +0000 (09:02 -0700)
committerGitHub <noreply@github.com>
Tue, 3 Oct 2023 16:02:44 +0000 (16:02 +0000)
(cherry picked from commit 4227bfa8b273207a2b882f7d69c8ac49c3d2b57d)

Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Doc/library/sqlite3.rst

index d5afaa1c4c9557cf7b51aa49656f55d644a4e5a8..43921c342329248c4ee3e96f0f85cb1c457cae41 100644 (file)
@@ -2406,9 +2406,9 @@ or if :attr:`~Connection.autocommit` is ``True``,
 the context manager does nothing.
 
 .. note::
-
    The context manager neither implicitly opens a new transaction
-   nor closes the connection.
+   nor closes the connection. If you need a closing context manager, consider
+   using :meth:`contextlib.closing`.
 
 .. testcode::