From 287b84de939db47aa8c6f30734ceb8aba9d1db29 Mon Sep 17 00:00:00 2001 From: Xtreak Date: Mon, 20 May 2019 03:22:20 +0530 Subject: bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079) The sqlit3.Connection object doesn't call its close() method when it's used as a context manager. --- Doc/includes/sqlite3/pysqlite_datetime.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Doc/includes/sqlite3/pysqlite_datetime.py') diff --git a/Doc/includes/sqlite3/pysqlite_datetime.py b/Doc/includes/sqlite3/pysqlite_datetime.py index 68d49358a5..5d843f906b 100644 --- a/Doc/includes/sqlite3/pysqlite_datetime.py +++ b/Doc/includes/sqlite3/pysqlite_datetime.py @@ -18,3 +18,5 @@ cur.execute('select current_date as "d [date]", current_timestamp as "ts [timest row = cur.fetchone() print("current_date", row[0], type(row[0])) print("current_timestamp", row[1], type(row[1])) + +con.close() -- cgit v1.2.1