summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-03 16:02:44 (GMT)
committerGitHub <noreply@github.com>2023-10-03 16:02:44 (GMT)
commit90dea557bb0b171efd62ad4eef5b1939d5b248fd (patch)
tree5340476c3f5675903c70ac57cd44ed8c06f87589 /Doc
parent4dac406f662d99ac494cae6fa7319ad623269a61 (diff)
downloadcpython-90dea557bb0b171efd62ad4eef5b1939d5b248fd.zip
cpython-90dea557bb0b171efd62ad4eef5b1939d5b248fd.tar.gz
cpython-90dea557bb0b171efd62ad4eef5b1939d5b248fd.tar.bz2
[3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH-109322) (#110294)
(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>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sqlite3.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index d5afaa1..43921c3 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -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::