Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-28 Thread Tim Peters
[Phillip J. Eby] > By that reasoning, binary compatibility won't be an issue anywhere else, > either, since the change was made on the 2.5 alpha trunk, and ISTM that 2.5 > will require recompiling extensions anyway. I don't know how people work on Linux; that's why I brought it up. The binary API

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-28 Thread Tim Peters
[Thomas Wouters] >> So does that make all cycles involving only objects with finalizers >> impervious to cycle-gc? I guess it'd have to be that way. [again] > Er, I meant to say 'does that make all cycles involving just one object with > a finalizer impervious to cycle-gc'. Both are true, and bot

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-28 Thread Thomas Wouters
On 3/29/06, Thomas Wouters <[EMAIL PROTECTED]> wrote: So does that make all cycles involving only objects with finalizers impervious to cycle-gc? I guess it'd have to be that way.Er, I meant to say 'does that make all cycles involving just one object with a finalizer impervious to cycle-gc'. -- Tho

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-28 Thread Phillip J. Eby
At 06:13 PM 3/28/2006 -0500, Tim Peters wrote: >2. Because of the obscure gimmicks that try to cater to using old > binary extension modules across new Python releases without > recompiling, there's no guarantee that the tp_del slot even exists, > and therefore we don't try to access tp

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-28 Thread Tim Peters
[Thomas Wouters] > ... > The cycle this nested generator creates, which is also involved in the > test_tee > leak, is not cleanable by the cycle-gc, and it looks like it hasn't been > since the yield-expr/coroutine patch was included in the trunk. That could very well be. Adding finalizers to ge

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-28 Thread Thomas Wouters
On 3/27/06, Neal Norwitz <[EMAIL PROTECTED]> wrote: On 3/27/06, Thomas Wouters <[EMAIL PROTECTED]> wrote:>> The teeobject has GC (hence the word 'and' in 'itertools.tee and its> internal teedataobject' ;-) The problem with test_generators is that this > also leaks:>> def leak():> def gen():>   

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-27 Thread Neal Norwitz
On 3/27/06, Thomas Wouters <[EMAIL PROTECTED]> wrote: > > The teeobject has GC (hence the word 'and' in 'itertools.tee and its > internal teedataobject' ;-) The problem with test_generators is that this > also leaks: > > def leak(): > def gen(): > while True: > yield g >

Re: [Python-Dev] [Python-checkins] r43358 - python/trunk/Modules/itertoolsmodule.c

2006-03-27 Thread Thomas Wouters
On 3/27/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Modified:>   python/trunk/Modules/itertoolsmodule.c> Log:>> Make itertools.tee and its internal teedataobject participate in GC. This> alone does not solve the leak in test_generators, unfortunately, but it is > part of test_generators' pro