[3.12] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH-109322) (#110294)

(cherry picked from commit 4227bfa8b2)

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>
This commit is contained in:
Miss Islington (bot) 2023-10-03 09:02:44 -07:00 committed by GitHub
parent 4dac406f66
commit 90dea557bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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::