Re: [Python-Dev] Better module shutdown procedure

2009-10-16 Thread Amaury Forgeot d'Arc
2009/10/16 Neil Schemenauer :
> After some experimentation I realize this idea is not ready yet.
> The main problem comes from references to Python objects that
> modules keep but don't expose to the garbage collector. For example,
> gcmodule.c has a static pointer "tmod" that is a reference to the
> "time" module. This reference prevents the "time" module from being
> freed during interpreter shutdown.
>
> Ideally, I suppose modules should be treated like any other object
> and have tp_traverse and tp_clear methods that deal with these sorts
> of pointers. They would have to delegated to the instance since each
> module would have its own implementation.

Note since python 3.0 (and PEP 3121), the PyModuleDef structure has
some members like m_traverse, m_clear and m_free for this very
purpose.
So far, nobody cared to implement these methods for any module. Maybe
one should start at least for static PyObject* that contain references
to modules.

-- 
Amaury Forgeot d'Arc
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Better module shutdown procedure

2009-10-16 Thread Benjamin Peterson
2009/10/16 Amaury Forgeot d'Arc :
> 2009/10/16 Neil Schemenauer :
>> After some experimentation I realize this idea is not ready yet.
>> The main problem comes from references to Python objects that
>> modules keep but don't expose to the garbage collector. For example,
>> gcmodule.c has a static pointer "tmod" that is a reference to the
>> "time" module. This reference prevents the "time" module from being
>> freed during interpreter shutdown.
>>
>> Ideally, I suppose modules should be treated like any other object
>> and have tp_traverse and tp_clear methods that deal with these sorts
>> of pointers. They would have to delegated to the instance since each
>> module would have its own implementation.
>
> Note since python 3.0 (and PEP 3121), the PyModuleDef structure has
> some members like m_traverse, m_clear and m_free for this very
> purpose.
> So far, nobody cared to implement these methods for any module. Maybe
> one should start at least for static PyObject* that contain references
> to modules.

I believe the implementation is buggy because modules (and their
states) can easily be finalized before the objects contained in them.
For example, when I tried to convert the _io module to use a state, it
resulted in segfaults when the dealloc methods of objects tried to use
objects in a state, which had already been deallocated.



-- 
Regards,
Benjamin
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Summary of Python tracker Issues

2009-10-16 Thread Python tracker

ACTIVITY SUMMARY (10/09/09 - 10/16/09)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue 
number.  Do NOT respond to this message.


 2468 open (+37) / 16504 closed (+20) / 18972 total (+57)

Open issues with patches:   982

Average duration of open issues: 669 days.
Median duration of open issues: 423 days.

Open Issues Breakdown
   open  2432 (+37)
pending35 ( +0)

Issues Created Or Reopened (58)
___

Python 2.6.3 / setuptools 0.6c9: extension module builds fail wi 10/12/09
CLOSED http://bugs.python.org/issue7064reopened barry   
  
   

Add alternate float formatting styles to new-style formatting.   10/09/09
   http://bugs.python.org/issue7094created  mark.dickinson  
  
   

Multiprocessing.Array(lock=False) fails  10/09/09
CLOSED http://bugs.python.org/issue7095created  schlesin
  
   

test_curses fails on 3.1 when run under regrtest 10/10/09
   http://bugs.python.org/issue7096created  r.david.murray  
  
   

urlparse.urljoin of simple "http://"; and "somedomain.com" produc 10/10/09
CLOSED http://bugs.python.org/issue7097created  ssteiner
  
   

g formatting for decimal types should always strip trailing zero 10/10/09
   http://bugs.python.org/issue7098created  mark.dickinson  
  
   patch   

Decimal.is_normal should return True even for numbers with expon 10/10/09
   http://bugs.python.org/issue7099created  mark.dickinson  
  
   

test_xmlrpc: global name 'stop_serving' is not defined   10/10/09
   http://bugs.python.org/issue7100created  pitrou  
  
   

tarfile: OSError with TarFile.add(..., recursive=True) about non 10/10/09
   http://bugs.python.org/issue7101created  denis   
  
   

Problems building pyhton from source on Snow Leopard (Mac OS X   10/11/09
   http://bugs.python.org/issue7102created  FredrikHedman   
  
   

Error in config parser example (w/ Patch)10/11/09
CLOSED http://bugs.python.org/issue7103created  tcourbon
  
   patch   

test_descr uses __cmp__ which will never be called   10/11/09
CLOSED http://bugs.python.org/issue7104created  stutzbach   
  
   

weak dict iterators are fragile because of unpredictable GC runs 10/11/09
   http://bugs.python.org/issue7105created  pitrou  
  
   patch   

Python crashed in the middle of an argument between wx  and boa_c 10/11/09
CLOSED http://bugs.python.org/issue7106created  bvn 
  
   

Missing uninstallation instructions for mac  10/11/09
   http://bugs.python.org/issue7107created  gradha  
  
   

test_commands.py failing on OS X 10.5.7 due to '@' in ls output  10/11/09
   http://bugs.python.org/issue7108created  minge   
  
   patch   

broken link on news page 10/12/09
CLOSED http://bugs.python.org/issue7109created  mkiever 
  
   

Output test failures on stderr in regrtest.py10/12/09
   http://bugs.python.org/issue7110created  ezio.melotti
  
   

core dump when stderr is moved   10/12/09
   http://bugs.python.org/issue7111created  petere  
  
   

[Python-Dev] Tkinter script crashes Python 3.1

2009-10-16 Thread Gregor Lingl
I've written a small Tkinter-Script, that crashes Python 3.1 (but not 
Python 2.6) without any specific rrror message. When started from within 
IDLE, the failing of the script also closes IDLE. (This is the case 
under Windows, Mac OS X and Linux (teted with Ubuntu 9.04))


Bug-Tracker Issue 6717
The script is attached to this issue

I think, errors like this should definitely not occur. Instead a message 
like "recusion depth exceeded" should be displayed (and IDLE should 
remain functional, if used)


Since I do not have the means availble to track down this bug, I'd like 
to draw your attention to it and to ask if someone else has the means 
and time to do so.


I'd also suggest to increase the priority of this bug in the bugtracker.

Regards,
Gregor



___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com