summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-14 19:53:23 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-14 19:53:23 +0000
commitdd3aa9afee23730771425e95840e3dc7a4bf97e8 (patch)
tree5bdb6533f5ae497674505423b27ffd0683b85a53
parent7f7327014c3225e43ddc43cee6b8505c5dd79cfa (diff)
downloadcpython-git-dd3aa9afee23730771425e95840e3dc7a4bf97e8.tar.gz
Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
-rw-r--r--Lib/logging/__init__.py8
-rw-r--r--Misc/NEWS13
2 files changed, 11 insertions, 10 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index b6941b42b6..3fe03cdeb6 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -273,12 +273,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 26cbbb4143..f60ad1385d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -18,12 +18,15 @@ Core and Builtins
Library
-------
-- Issue #7115: Fixed the extension module builds that is failing when using
+- Issue #7120: logging: Removed import of multiprocessing which is causing
+ crash in GAE.
+
+- Issue #7115: Fixed the extension module builds that is failing when using
paths in the extension name instead of dotted names.
- Issue #7068: Fixed the partial renaming that occured in r72594.
-- Issue #7064: Fixed the incompatibility with Setuptools in distutils
+- Issue #7064: Fixed the incompatibility with Setuptools in distutils
when running the build_ext command.
- Issue #7052: Removed nonexisting NullHandler from logging.__all__.
@@ -127,7 +130,7 @@ Core and Builtins
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 #6790: Make it possible again to pass an `array.array` to
`httplib.HTTPConnection.send`. Patch by Kirk McDonald.
@@ -177,7 +180,7 @@ Library
- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through
proxy. Original patch by Christopher Li, changes made by Senthil Kumaran.
-- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was
+- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was
unconditionally calling "os.close(sys.stdin.fileno())" resulting in file
descriptor errors
@@ -277,7 +280,7 @@ Library
- Issue #2622: Fixed an ImportError when importing email.messsage from a
standalone application built with py2exe or py2app.
-- Issue #6455: Fixed test_build_ext under win32.
+- Issue #6455: Fixed test_build_ext under win32.
- Issue #6403: Fixed package path usage in build_ext.