Kaydet (Commit) 96d4aa3f authored tarafından Vinay Sajip's avatar Vinay Sajip

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

üst 42e30556
...@@ -284,12 +284,10 @@ class LogRecord: ...@@ -284,12 +284,10 @@ class LogRecord:
self.threadName = None self.threadName = None
if not logMultiprocessing: if not logMultiprocessing:
self.processName = None self.processName = None
elif 'multiprocessing' not in sys.modules:
self.processName = 'MainProcess'
else: else:
try: self.processName = sys.modules['multiprocessing'].current_process().name
from multiprocessing import current_process
self.processName = current_process().name
except ImportError:
self.processName = None
if logProcesses and hasattr(os, 'getpid'): if logProcesses and hasattr(os, 'getpid'):
self.process = os.getpid() self.process = os.getpid()
else: else:
......
...@@ -12,6 +12,9 @@ What's New in Python 3.2 Alpha 1? ...@@ -12,6 +12,9 @@ What's New in Python 3.2 Alpha 1?
Core and Builtins 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. - Issue #1754094: Improve the stack depth calculation in the compiler.
There should be no other effect than a small decrease in memory use. There should be no other effect than a small decrease in memory use.
Patch by Christopher Tur Lesniewski-Laas. Patch by Christopher Tur Lesniewski-Laas.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment