Skip to content

Commit e8ce872

Browse files
[3.12] pythongh-126259: Fix "unclosed database" warning in sqlite3 doctest (pythonGH-126260) (python#126266)
(cherry picked from commit 295262c) Co-authored-by: sobolevn <[email protected]>
1 parent dc3c075 commit e8ce872

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Doc/library/sqlite3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,6 +2420,7 @@ Some useful URI tricks include:
24202420
>>> con.execute("CREATE TABLE readonly(data)")
24212421
Traceback (most recent call last):
24222422
OperationalError: attempt to write a readonly database
2423+
>>> con.close()
24232424

24242425
* Do not implicitly create a new database file if it does not already exist;
24252426
will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:

0 commit comments

Comments
 (0)