[Python-checkins] r76508 - python/trunk/Lib/logging/__init__.py

vinay.sajip python-checkins at python.org
Wed Nov 25 10:22:48 CET 2009


Author: vinay.sajip
Date: Wed Nov 25 10:22:47 2009
New Revision: 76508

Log:
logging: made _handlers a WeakValueDictionary.

Modified:
   python/trunk/Lib/logging/__init__.py

Modified: python/trunk/Lib/logging/__init__.py
==============================================================================
--- python/trunk/Lib/logging/__init__.py	(original)
+++ python/trunk/Lib/logging/__init__.py	Wed Nov 25 10:22:47 2009
@@ -590,7 +590,7 @@
 #   Handler classes and functions
 #---------------------------------------------------------------------------
 
-_handlers = {}  #map of handler names to handlers
+_handlers = weakref.WeakValueDictionary()  #map of handler names to handlers
 _handlerList = [] # added to allow handlers to be removed in reverse of order initialized
 
 def _removeHandlerRef(wr):


More information about the Python-checkins mailing list