summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-16 14:06:44 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-16 14:06:44 (GMT)
commit03d5c346c05915816a5e382545b3b9cc547c45fd (patch)
treed2510d96c41b9460aa0892394b3796efadc332e1
parent026ac7cf69816f67b3fe9e26dc0b6c97206b8c11 (diff)
downloadcpython-03d5c346c05915816a5e382545b3b9cc547c45fd.zip
cpython-03d5c346c05915816a5e382545b3b9cc547c45fd.tar.gz
cpython-03d5c346c05915816a5e382545b3b9cc547c45fd.tar.bz2
Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
-rw-r--r--Lib/logging/__init__.py8
-rw-r--r--Misc/NEWS21
2 files changed, 15 insertions, 14 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 0be6ed4..f85296d 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -287,12 +287,10 @@ class LogRecord:
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:
diff --git a/Misc/NEWS b/Misc/NEWS
index 0e85ba0..2ac0d9f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
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 @@ Library
- 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 @@ Tools/Demos
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 @@ Documentation
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