summaryrefslogtreecommitdiffstats
path: root/Lib/test/crashers
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-01-23 23:21:22 (GMT)
committerBrett Cannon <bcannon@gmail.com>2007-01-23 23:21:22 (GMT)
commitf5bee30e30687447d9d532dc298ba0793beb4515 (patch)
tree429f3a16538dc9c832f2b04f74f9200f95121b23 /Lib/test/crashers
parent6c5c502b914261ba333e98c4657a8d90cfbbe872 (diff)
downloadcpython-f5bee30e30687447d9d532dc298ba0793beb4515.zip
cpython-f5bee30e30687447d9d532dc298ba0793beb4515.tar.gz
cpython-f5bee30e30687447d9d532dc298ba0793beb4515.tar.bz2
Fix crasher for when an object's __del__ creates a new weakref to itself.
Patch only fixes new-style classes; classic classes still buggy. Closes bug #1377858. Already backported.
Diffstat (limited to 'Lib/test/crashers')
-rw-r--r--Lib/test/crashers/weakref_in_del.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/crashers/weakref_in_del.py b/Lib/test/crashers/weakref_in_del.py
index 3bbcfc3..2e9b186 100644
--- a/Lib/test/crashers/weakref_in_del.py
+++ b/Lib/test/crashers/weakref_in_del.py
@@ -1,11 +1,12 @@
import weakref
# http://python.org/sf/1377858
+# Fixed for new-style classes in 2.5c1.
ref = None
def test_weakref_in_del():
- class Target(object):
+ class Target():
def __del__(self):
global ref
ref = weakref.ref(self)