[Python-checkins] r77805 - in python/branches/release24-maint: Lib/logging/__init__.py Misc/NEWS

vinay.sajip python-checkins at python.org
Thu Jan 28 01:06:58 CET 2010


Author: vinay.sajip
Date: Thu Jan 28 01:06:57 2010
New Revision: 77805

Log:
Reverted back to r67866.

Modified:
   python/branches/release24-maint/Lib/logging/__init__.py
   python/branches/release24-maint/Misc/NEWS

Modified: python/branches/release24-maint/Lib/logging/__init__.py
==============================================================================
--- python/branches/release24-maint/Lib/logging/__init__.py	(original)
+++ python/branches/release24-maint/Lib/logging/__init__.py	Thu Jan 28 01:06:57 2010
@@ -166,10 +166,7 @@
 #the lock would already have been acquired - so we need an RLock.
 #The same argument applies to Loggers and Manager.loggerDict.
 #
-if thread:
-    _lock = threading.RLock()
-else:
-    _lock = None
+_lock = None
 
 def _acquireLock():
     """
@@ -177,6 +174,9 @@
 
     This should be released with _releaseLock().
     """
+    global _lock
+    if (not _lock) and thread:
+        _lock = threading.RLock()
     if _lock:
         _lock.acquire()
 

Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS	(original)
+++ python/branches/release24-maint/Misc/NEWS	Thu Jan 28 01:06:57 2010
@@ -9,11 +9,6 @@
 
 *Release date: XX-XXX-2009*
 
-Library
--------
-
-- Issue #7403: logging: Fixed possible race condition in lock creation.
-
 
 What's New in Python 2.4.6?
 ===========================


More information about the Python-checkins mailing list