[Python-checkins] cpython (merge 3.5 -> default): Issue #27787: Merge regrtest fixup from 3.5

martin.panter python-checkins at python.org
Sat Aug 20 03:45:14 EDT 2016


https://hg.python.org/cpython/rev/e5777c5d108c
changeset:   102797:e5777c5d108c
parent:      102793:2e243f78720e
parent:      102794:7ddbc2263943
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Aug 20 07:38:21 2016 +0000
summary:
  Issue #27787: Merge regrtest fixup from 3.5

files:
  Lib/test/libregrtest/save_env.py |  1 +
  Misc/NEWS                        |  6 ++++++
  2 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Lib/test/libregrtest/save_env.py b/Lib/test/libregrtest/save_env.py
--- a/Lib/test/libregrtest/save_env.py
+++ b/Lib/test/libregrtest/save_env.py
@@ -268,6 +268,7 @@
     def __exit__(self, exc_type, exc_val, exc_tb):
         saved_values = self.saved_values
         del self.saved_values
+        support.gc_collect()  # Some resources use weak references
         for name, get, restore in self.resource_info():
             current = get()
             original = saved_values.pop(name)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,12 @@
 - Issue #12713: Allowed abbreviation of subcommands by end-users for users of
   argparse.
 
+Tests
+-----
+
+- Issue #27787: Call gc.collect() before checking each test for "dangling
+  threads", since the dangling threads are weak references.
+
 
 What's New in Python 3.6.0 alpha 4
 ==================================

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list