From: Martin Panter Date: Sat, 20 Aug 2016 06:50:14 +0000 (+0000) Subject: Issue #27787: Clean up weak references before checking for dangling threads X-Git-Tag: v3.6.0b1~631^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68c1f1ed034bc0084596e19540910623ecbf64de;p=thirdparty%2FPython%2Fcpython.git Issue #27787: Clean up weak references before checking for dangling threads --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index fecfd0967a27..ba8a780fc9e9 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1258,6 +1258,7 @@ class saved_test_environment: 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 index 07a76e6bf039..3ef2e6105eb8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -155,6 +155,9 @@ C API Tests ----- +- Issue #27787: Call gc.collect() before checking each test for "dangling + threads", since the dangling threads are weak references. + - Issue #27369: In test_pyexpat, avoid testing an error message detail that changed in Expat 2.2.0.