Skip to content

Commit 6a6e887

Browse files
miss-islingtonLincoln-developerblurb-it[bot]erlend-aasland
authored
[3.11] 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 3079aa3 commit 6a6e887

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/sqlite3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,9 +2195,9 @@ If there is no open transaction upon leaving the body of the ``with`` statement,
21952195
the context manager is a no-op.
21962196

21972197
.. note::
2198-
21992198
The context manager neither implicitly opens a new transaction
2200-
nor closes the connection.
2199+
nor closes the connection. If you need a closing context manager, consider
2200+
using :meth:`contextlib.closing`.
22012201

22022202
.. testcode::
22032203

0 commit comments

Comments
 (0)