From c86d9e2846e5bcf7f047f96e5c95432ecfa4bcb7 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Fri, 17 Feb 2012 21:30:55 +0200 Subject: [PATCH] Fix a variable scoping error in an sqlite3 test Closes #11689. --- Lib/sqlite3/test/hooks.py | 1 + Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index a6161fac853..a92e8387861 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -168,6 +168,7 @@ class ProgressTests(unittest.TestCase): con = sqlite.connect(":memory:") action = 0 def progress(): + nonlocal action action = 1 return 0 con.set_progress_handler(progress, 1) diff --git a/Misc/NEWS b/Misc/NEWS index 9c6485576b4..754baab6d63 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -477,6 +477,8 @@ Tools/Demos Tests ----- +- Issue #11689: Fix a variable scoping error in an sqlite3 test + - Issue #13786: Remove unimplemented 'trace' long option from regrtest.py. - Issue #13725: Fix regrtest to recognize the documented -d flag.