]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 1 Nov 2024 07:23:11 +0000 (08:23 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2024 07:23:11 +0000 (07:23 +0000)
(cherry picked from commit 295262c8ecb085b4fea552bc6229af3551bbaf7a)

Co-authored-by: sobolevn <mail@sobolevn.me>
Doc/library/sqlite3.rst

index 91250c45410597de062f23dda9b1bd73c2065117..0d2004497882e2901422ae722ec3122b362533e6 100644 (file)
@@ -2460,6 +2460,7 @@ Some useful URI tricks include:
    >>> con.execute("CREATE TABLE readonly(data)")
    Traceback (most recent call last):
    OperationalError: attempt to write a readonly database
+   >>> con.close()
 
 * Do not implicitly create a new database file if it does not already exist;
   will raise :exc:`~sqlite3.OperationalError` if unable to create a new file: