[Python-checkins] r73844 - in python/branches/py3k: Lib/socketserver.py Lib/test/test_sys.py Modules/_multiprocessing/win32_functions.c

kristjan.jonsson python-checkins at python.org
Sat Jul 4 17:16:38 CEST 2009


Author: kristjan.jonsson
Date: Sat Jul  4 17:16:38 2009
New Revision: 73844

Log:
Revert last change, which was incorrect.

Modified:
   python/branches/py3k/Lib/socketserver.py
   python/branches/py3k/Lib/test/test_sys.py
   python/branches/py3k/Modules/_multiprocessing/win32_functions.c

Modified: python/branches/py3k/Lib/socketserver.py
==============================================================================
--- python/branches/py3k/Lib/socketserver.py	(original)
+++ python/branches/py3k/Lib/socketserver.py	Sat Jul  4 17:16:38 2009
@@ -445,12 +445,7 @@
 
     def close_request(self, request):
         """Called to clean up an individual request."""
-        try:
-            #explicitly shutdown.  socket.close() merely releases
-            #the socket and waits for GC to perform the actual close.
-            request.shutdown(socket.SHUT_WR)
-        except socket.error:
-            pass #some platforms may raise ENOTCONN here
+        request.shutdown(socket.SHUT_WR)
         request.close()
 
 

Modified: python/branches/py3k/Lib/test/test_sys.py
==============================================================================
--- python/branches/py3k/Lib/test/test_sys.py	(original)
+++ python/branches/py3k/Lib/test/test_sys.py	Sat Jul  4 17:16:38 2009
@@ -182,8 +182,6 @@
                 "under Windows, test would generate a spurious crash dialog")
         code = textwrap.dedent("""
             import sys
-            import msvcrt
-            msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS)
 
             def f():
                 try:

Modified: python/branches/py3k/Modules/_multiprocessing/win32_functions.c
==============================================================================
--- python/branches/py3k/Modules/_multiprocessing/win32_functions.c	(original)
+++ python/branches/py3k/Modules/_multiprocessing/win32_functions.c	Sat Jul  4 17:16:38 2009
@@ -130,6 +130,12 @@
 	if (!PyArg_ParseTuple(args, "I", &uExitCode))
 		return NULL;
 
+	#if defined(Py_DEBUG)
+		SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);
+		_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+	#endif
+
+
 	ExitProcess(uExitCode);
 
 	return NULL;


More information about the Python-checkins mailing list