Skip to content

Commit 992652d

Browse files
Lincoln-developerblurb-it[bot]erlend-aasland
authored andcommitted
Enhanced sqlite3 connection context management documentation with contextlib.closing pythongh-109234 (pythonGH-109322)
* Enhanced sqlite3 connection context management documentation with contextlib.closing * 📜🤖 Added by blurb_it. * Fixed gitignore spelling error from nitignore to gitignore * Renamed .gitignore to .nitignore * Added generated doctests * Deleted sqlite3 generated files * Removed white-space changes * Removed News entry from the doc * Expanded a note that context manager can be used for connection management using contextlib.closing * Removed repeated contextlib.closing code snippet * Expanded the note around usage of context manageer for sqlite3 connection management * Deleted extra white-spaces * Deleted extra white-space * re-arranged context manager wording * Re-arranged word layout on how to use context manager * Fix whitespace errors * Remove unneeded change in .gitignore * Added suggested changes * Added suggested change redirecting to the contextlib.closing implementation * Added closing keyword * Removed line 2473 --------- (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 992652d

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
@@ -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)