[Python-checkins] r78174 - in python/branches/release31-maint: Misc/NEWS Modules/_testcapimodule.c

mark.dickinson python-checkins at python.org
Sat Feb 13 19:43:29 CET 2010


Author: mark.dickinson
Date: Sat Feb 13 19:43:28 2010
New Revision: 78174

Log:
Merged revisions 78172-78173 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r78172 | mark.dickinson | 2010-02-13 18:34:53 +0000 (Sat, 13 Feb 2010) | 4 lines
  
  Issue #7924: Fix an intermittent 'XXX undetected error' crash in
  test_capi, due to test_capsule failing to clear an exception.  Many
  thanks to Florent Xicluna for the diagnosis and fix.
........
  r78173 | mark.dickinson | 2010-02-13 18:37:34 +0000 (Sat, 13 Feb 2010) | 1 line
  
  Revert an earlier attempt (r76810) to fix the intermittent test_capi failures fixed in r78172.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Misc/NEWS
   python/branches/release31-maint/Modules/_testcapimodule.c

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Sat Feb 13 19:43:28 2010
@@ -308,6 +308,10 @@
 Tests
 -----
 
+- Issue #7924: Fix an intermittent 'XXX undetected error' failure in
+  test_capi (only seen so far on platforms where the curses module
+  wasn't built), due to an uncleared exception.
+
 - issue #7728: test_timeout was changed to use test_support.bind_port
   instead of a hard coded port.
 

Modified: python/branches/release31-maint/Modules/_testcapimodule.c
==============================================================================
--- python/branches/release31-maint/Modules/_testcapimodule.c	(original)
+++ python/branches/release31-maint/Modules/_testcapimodule.c	Sat Feb 13 19:43:28 2010
@@ -1393,27 +1393,14 @@
 			Py_DECREF(object);
 			Py_DECREF(module);
 		}
+		else
+			PyErr_Clear();
 	}
 
   exit:
 	if (error) {
 		return raiseTestError("test_capsule", error);
 	}
-	/* 13/12/2009: something is causing test_capi to fail occasionally on
-	   the Solaris buildbot, with the output:
-
-		internal test_L_code
-		internal test_Z_code
-		internal test_bug_7414
-		internal test_capsule
-		XXX undetected error
-		internaltest test_capi crashed -- <class 'ImportError'>: No module named datetime
-
-	   It seems possible that test_capsule is raising an exception but
-	   failing to return NULL.  Do a PyErr_Occurred check to find out.
-	*/
-	if (PyErr_Occurred())
-		return NULL;
 	Py_RETURN_NONE;
 #undef FAIL
 }


More information about the Python-checkins mailing list