summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-06-04 09:20:12 (GMT)
committerGeorg Brandl <georg@python.org>2005-06-04 09:20:12 (GMT)
commitde09e9571c93cad2eb0a9a6ea161d32ba60de88c (patch)
treec0ca165ce61bc3bace1267aac694299cd767875d
parentbf0771063f286a72d651857ea3461135c14d16c7 (diff)
downloadcpython-de09e9571c93cad2eb0a9a6ea161d32ba60de88c.zip
cpython-de09e9571c93cad2eb0a9a6ea161d32ba60de88c.tar.gz
cpython-de09e9571c93cad2eb0a9a6ea161d32ba60de88c.tar.bz2
Backport bug #1196315: fix weakref.WeakValueDictionary constructor.
-rw-r--r--Lib/weakref.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py
index c0669b0..09bd0be 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -43,12 +43,12 @@ class WeakValueDictionary(UserDict.UserDict):
# way in).
def __init__(self, *args, **kw):
- UserDict.UserDict.__init__(self, *args, **kw)
def remove(wr, selfref=ref(self)):
self = selfref()
if self is not None:
del self.data[wr.key]
self._remove = remove
+ UserDict.UserDict.__init__(self, *args, **kw)
def __getitem__(self, key):
o = self.data[key]()
diff --git a/Misc/NEWS b/Misc/NEWS
index 7eba41f..28b9c2a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@ Extension Modules
Library
-------
+- Bug #1196315: fix weakref.WeakValueDictionary constructor.
+
- Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
component of the path.