[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The GC behaves gracefully in 3.4: the gc_bug script shows no uncollectable 
object. I don't think this is worth fixing in 3.3.

--
nosy: +pitrou
resolution:  - out of date
status: open - pending
versions:  -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-23 Thread Christian Heimes

Christian Heimes added the comment:

I agree with not fixing 3.3.

--
status: pending - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-23 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

ping :)

--
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Is the error still current? io.StringIO is now completely implemented in 
_io/textio.c, and should not have any Python-level __del__.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

I don't know ... Is somebody able to test it?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2012-11-26 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
stage:  - patch review
type:  - behavior
versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2010-09-18 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Can we have an update on this please as it seems important.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2010-02-19 Thread Jeremy Hylton

Jeremy Hylton jhyl...@gmail.com added the comment:

Amaury-- I think that will work.  I put together a small patch that seems to 
pass all the tests, but it too messy.  We need some care to make sure we don't 
spin forever if there's some degenerate case where we never escape GC.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2010-02-18 Thread Jeremy Hylton

Jeremy Hylton jhyl...@gmail.com added the comment:

I'm trying to figure out the attached script.  If I run Python 3.0, the script 
doesn't run because of the undefined gc.DEBUG_OBJECTS.  If I just remove that, 
the script runs without error.  Does that mean the problem is fixed?  Or is 
running without an error an example of the problem?

If I add gc.DEBUG_SAVEALL, it fails--but that seems obvious because 
DEBUG_SAVEALL adds all objects with finalizers to gc.garbage.

--
nosy: +Jeremy.Hylton

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2010-02-18 Thread Jeremy Hylton

Jeremy Hylton jhyl...@gmail.com added the comment:

I spent some time to understand the example script today.  The specific issue 
is that a set of objects get put into the list of unreachable objects with 
finalizers (both Immutable and Finalizer instances).  When Cycle's __dict__ is 
cleared, it also decrefs Immutable which resurrects it and Finalizer.  The 
garbage collector is not prepared for an unreachable finalizer object to become 
reachable again.  More generally, it's hard to assume anything about the state 
of the finalizers after unreachable trash is collected.  I'll think more about 
what to do, but I don't see any easy solutions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2010-02-18 Thread Jeremy Hylton

Jeremy Hylton jhyl...@gmail.com added the comment:

One last thought on this bug.  The problem is that after we try to delete 
garbage, we really can't know much about the state of the objects in the 
finalizers list.  If any of the objects that are cleared end up causing a 
finalizer to run, then any of the objects in the finalizers list may be 
reachable again.  One possibility is to do nothing with the objects in the 
finalizers list if there was any garbage to delete.  That means objects with 
finalizers would be harder to get to gc.collect()--for example, you'd need to 
call gc.collect() twice in a row.  The first time to clear garbage, the second 
time to handle unreachable objects with finalizers.  Or the GC could run a 
second time if garbage was cleared and finalizers was non-empty.

A more complicated possibility would be to track some object state about when a 
finalizer was run.  If any of the objects in finalizers had a finalizer that 
ran while garbage was cleared, we could skip the finalizers list.  I don't know 
how to implement this, since an arbitrary C type could run Python code in 
tp_dealloc without notifying GC.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2007-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

Hoping to draw Tim into this... He's the only one I know who truly
understands these issues...

--
assignee:  - tim_one
nosy: +tim_one

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1540
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540] Refleak tests: test_doctest and test_gc are failing

2007-12-02 Thread Christian Heimes

New submission from Christian Heimes:

I've seen the problem on Windows only. test_doctest fails and the
problem also causes test_gc to fail when it is run after test_doctest.
W/o a prior run of test_doctest test_gc doesn't fail.

File c:\dev\python\py3k\lib\test\test_doctest.py, line 1570, in
test.test_doct
est.test_debug
Failed example:
try: doctest.debug_src(s)
finally: sys.stdin = real_stdin
Expected:
 string(1)module()
(Pdb) next
12
--Return--
 string(1)module()-None
(Pdb) print(x)
12
(Pdb) continue
Got:
 c:\dev\python\py3k\lib\io.py(281)__del__()
- try:
(Pdb) next
 c:\dev\python\py3k\lib\io.py(282)__del__()
- self.close()
(Pdb) print(x)
*** NameError: NameError(name 'x' is not defined,)
(Pdb) continue
12
**
1 items had failures:
   1 of   4 in test.test_doctest.test_debug
***Test Failed*** 1 failures.
test test_doctest failed -- 1 of 418 doctests failed
test_gc
test test_gc failed -- Traceback (most recent call last):
  File c:\dev\python\py3k\lib\test\test_gc.py, line 193, in test_saveall
self.assertEqual(gc.garbage, [])
AssertionError: [io.BytesIO object at 0x01237968] != []

2 tests failed:
test_doctest test_gc

--
components: Tests, Windows
keywords: py3k
messages: 58089
nosy: tiran
priority: normal
severity: normal
status: open
title: Refleak tests: test_doctest and test_gc are failing
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1540
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com