diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-03 16:02:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 16:02:04 (GMT) |
commit | 6a6e8871ba0dcf4332093e198a876957651768ed (patch) | |
tree | 9d55517bba710cfc1e6b131debf779cc7fb9ceb3 | |
parent | 3079aa3f5d4f54a05b9b67cb60625e45581f7ade (diff) | |
download | cpython-6a6e8871ba0dcf4332093e198a876957651768ed.zip cpython-6a6e8871ba0dcf4332093e198a876957651768ed.tar.gz cpython-6a6e8871ba0dcf4332093e198a876957651768ed.tar.bz2 |
[3.11] 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>
-rw-r--r-- | Doc/library/sqlite3.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index f3bcfb5..c85f4fc 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -2195,9 +2195,9 @@ If there is no open transaction upon leaving the body of the ``with`` statement, the context manager is a no-op. .. 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:: |