From: Vinay Sajip Date: Wed, 25 Nov 2009 09:22:47 +0000 (+0000) Subject: logging: made _handlers a WeakValueDictionary. X-Git-Tag: v2.7a1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17e94e052faeb65061da6d152e0ceeea71b9b05b;p=thirdparty%2FPython%2Fcpython.git logging: made _handlers a WeakValueDictionary. --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index f5dfc39b644b..b1f92b02e489 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -590,7 +590,7 @@ class Filterer(object): # 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):