From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 1 Nov 2024 07:25:51 +0000 (+0100) Subject: [3.12] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260)... X-Git-Tag: v3.12.8~128 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8ce87219192b9e486198c11b57fea0f573ea9ea;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260) (#126266) (cherry picked from commit 295262c8ecb085b4fea552bc6229af3551bbaf7a) Co-authored-by: sobolevn --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index e85a63531a36..3078ec29afe1 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -2420,6 +2420,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: