[Python-checkins] r75445 - in python: branches/py3k/Lib/logging/__init__.py branches/py3k/Misc/NEWS trunk/Lib/logging/__init__.py trunk/Misc/NEWS

vinay.sajip python-checkins at python.org
Fri Oct 16 16:06:44 CEST 2009


Author: vinay.sajip
Date: Fri Oct 16 16:06:44 2009
New Revision: 75445

Log:
Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.

Modified:
   python/branches/py3k/Lib/logging/__init__.py
   python/branches/py3k/Misc/NEWS
   python/trunk/Lib/logging/__init__.py
   python/trunk/Misc/NEWS

Modified: python/branches/py3k/Lib/logging/__init__.py
==============================================================================
--- python/branches/py3k/Lib/logging/__init__.py	(original)
+++ python/branches/py3k/Lib/logging/__init__.py	Fri Oct 16 16:06:44 2009
@@ -284,12 +284,10 @@
             self.threadName = None
         if not logMultiprocessing:
             self.processName = None
+        elif 'multiprocessing' not in sys.modules:
+            self.processName = 'MainProcess'
         else:
-            try:
-                from multiprocessing import current_process
-                self.processName = current_process().name
-            except ImportError:
-                self.processName = None
+            self.processName = sys.modules['multiprocessing'].current_process().name
         if logProcesses and hasattr(os, 'getpid'):
             self.process = os.getpid()
         else:

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Fri Oct 16 16:06:44 2009
@@ -12,6 +12,9 @@
 Core and Builtins
 -----------------
 
+- Issue #7120: logging: Removed import of multiprocessing which is causing
+  crash in GAE.
+
 - Issue #1754094: Improve the stack depth calculation in the compiler.
   There should be no other effect than a small decrease in memory use.
   Patch by Christopher Tur Lesniewski-Laas.
@@ -94,11 +97,11 @@
 Library
 -------
 
-- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment 
+- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment
 
 - Issue #7086: Added TCP support to SysLogHandler, and tidied up some
   anachronisms in the code which were a relic of 1.5.2 compatibility.
-  
+
 - Issue #7082: When falling back to the MIME 'name' parameter, the
   correct place to look for it is the Content-Type header.
 
@@ -1116,7 +1119,7 @@
 Library
 -------
 
-- Issue #6516: Added owner/group support when creating tar archives in 
+- Issue #6516: Added owner/group support when creating tar archives in
   Distutils.
 
 - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.

Modified: python/trunk/Lib/logging/__init__.py
==============================================================================
--- python/trunk/Lib/logging/__init__.py	(original)
+++ python/trunk/Lib/logging/__init__.py	Fri Oct 16 16:06:44 2009
@@ -287,12 +287,10 @@
             self.threadName = None
         if not logMultiprocessing:
             self.processName = None
+        elif 'multiprocessing' not in sys.modules:
+            self.processName = 'MainProcess'
         else:
-            try:
-                from multiprocessing import current_process
-                self.processName = current_process().name
-            except ImportError:
-                self.processName = None
+            self.processName = sys.modules['multiprocessing'].current_process().name
         if logProcesses and hasattr(os, 'getpid'):
             self.process = os.getpid()
         else:

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Fri Oct 16 16:06:44 2009
@@ -12,6 +12,9 @@
 Core and Builtins
 -----------------
 
+- Issue #7120: logging: Removed import of multiprocessing which is causing
+  crash in GAE.
+
 - Issue #7140: The __dict__ of a module should not be cleared unless the module
   is the only object holding a reference to it.
 
@@ -412,18 +415,18 @@
 
 - Add support to the `ihooks` module for relative imports.
 
-- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment 
+- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment
 
 - Issue #7086: Added TCP support to SysLogHandler, and tidied up some
   anachronisms in the code which were a relic of 1.5.2 compatibility.
-  
+
 - Issue #7082: When falling back to the MIME 'name' parameter, the
   correct place to look for it is the Content-Type header.
 
 - Issue #7048: Force Decimal.logb to round its result when that result
   is too large to fit in the current precision.
 
-- Issue #6516: Added owner/group support when creating tar archives in 
+- Issue #6516: Added owner/group support when creating tar archives in
   Distutils.
 
 - Issue #7031: Add TestCase.assert(Not)IsInstance() methods.
@@ -1292,11 +1295,11 @@
 Build
 -----
 
-- Add 2 new options to ``--with-universal-archs`` on MacOSX: 
+- Add 2 new options to ``--with-universal-archs`` on MacOSX:
   ``intel`` builds a distribution with ``i386`` and ``x86_64`` architectures,
-  while ``3-way`` builds a distribution with the ``ppc``, ``i386`` 
-  and ``x86_64`` architectures. 
-  
+  while ``3-way`` builds a distribution with the ``ppc``, ``i386``
+  and ``x86_64`` architectures.
+
 - Issue #6802: Fix build issues on MacOSX 10.6
 
 - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6.
@@ -1356,12 +1359,12 @@
   for Windows.
 
 - Issue #6801 : symmetric_difference_update also accepts |.
-  Thanks to Carl Chenet. 
+  Thanks to Carl Chenet.
 
 C-API
 -----
 
-- Issue #6624: PyArg_ParseTuple with "s" format when parsing argument with 
+- Issue #6624: PyArg_ParseTuple with "s" format when parsing argument with
   NULL: Bogus TypeError detail string.
 
 - Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of


More information about the Python-checkins mailing list