Skip to content

Commit 90dea55

Browse files
miss-islingtonLincoln-developerblurb-it[bot]erlend-aasland
authored
[3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH-109322) (#110294)
(cherry picked from commit 4227bfa) Co-authored-by: Lincoln <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 4dac406 commit 90dea55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/sqlite3.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2406,9 +2406,9 @@ or if :attr:`~Connection.autocommit` is ``True``,
24062406
the context manager does nothing.
24072407

24082408
.. note::
2409-
24102409
The context manager neither implicitly opens a new transaction
2411-
nor closes the connection.
2410+
nor closes the connection. If you need a closing context manager, consider
2411+
using :meth:`contextlib.closing`.
24122412

24132413
.. testcode::
24142414

0 commit comments

Comments
 (0)