diff options
author | Thomas Wouters <thomas@python.org> | 2006-04-15 23:27:28 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-04-15 23:27:28 (GMT) |
commit | b8f81d48634ccee8a8a4089d04b81e1aadbc04fe (patch) | |
tree | 7fb3fe9a004e165a0847388d893a380522cc23a0 /Lib/test/leakers | |
parent | 81b092d0e60db093c8ed2637deea545cb1de471a (diff) | |
download | cpython-b8f81d48634ccee8a8a4089d04b81e1aadbc04fe.zip cpython-b8f81d48634ccee8a8a4089d04b81e1aadbc04fe.tar.gz cpython-b8f81d48634ccee8a8a4089d04b81e1aadbc04fe.tar.bz2 |
Add missing DECREF to PyErr_WriteUnraisable(). That function reports
exceptions that can't be raised any further, because (for instance) they
occur in __del__ methods. The coroutine tests in test_generators was
triggering this leak. Remove the leakers' testcase, and add a simpler
testcase that explicitly tests this leak to test_generators.
test_generators now no longer leaks at all, on my machine. This fix may also
solve other leaks, but my full refleakhunting run is still busy, so who
knows?
Diffstat (limited to 'Lib/test/leakers')
-rw-r--r-- | Lib/test/leakers/test_gen1.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Lib/test/leakers/test_gen1.py b/Lib/test/leakers/test_gen1.py deleted file mode 100644 index 72f644d..0000000 --- a/Lib/test/leakers/test_gen1.py +++ /dev/null @@ -1,19 +0,0 @@ -import gc - -# Taken from test_generators - -def f(): - try: - yield - except GeneratorExit: - yield "foo!" - -def inner_leak(): - g = f() - g.next() - -def leak(): - inner_leak() - gc.collect() - gc.collect() - gc.collect() |