Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Duncan Booth
Jim Jewett [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: As a strawman proposal: deletes = [(obj.__del__.cycle, obj) for obj in cycle if hasattr(obj, __del__) and hasattr(obj.__del__, cycle)] deletes.sort() for (cycle, obj) in deletes:

Re: [Python-Dev] pysqlite for 2.5?

2006-03-31 Thread Gerhard Häring
Martin v. Löwis wrote: Terry Reedy wrote: Gerhard Häring [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I proposed to link dynamically on Windows, and ship the Windows SQLite3.DLL. This has two advantages: - Python users can upgrade the SQLite3.DLL by a simple download from in

Re: [Python-Dev] unicode vs buffer (array) design issue can crash interpreter

2006-03-31 Thread M.-A. Lemburg
Martin v. Löwis wrote: Neal Norwitz wrote: See http://python.org/sf/1454485 for the gory details. Basically if you create a unicode array (array.array('u')) and try to append an 8-bit string (ie, not unicode), you can crash the interpreter. The problem is that the string is converted

[Python-Dev] New-style icons, .desktop file

2006-03-31 Thread Georg Brandl
Hi, some time ago, someone posted in python-list about icons using the Python logo from the new site design [1]. IMO they are looking great and would be a good replacement for the old non-scaling snakes on Windows in 2.5. While we're at it, Python (and IDLE) .desktop files could be added to the

Re: [Python-Dev] [Python-3000] Iterators for dict keys , values, and items == annoying :)

2006-03-31 Thread Taro Ogawa
Taro Ogawa taroso at gmail.com writes: Nick Coghlan ncoghlan at gmail.com writes: There are three big use cases: ... delurk ... Apologies - this was posted via gmane and the post I responded to appeared in the gmane.comp.python.devel.3000 tree... I'll repost there (and check gmane a

Re: [Python-Dev] Class decorators

2006-03-31 Thread Michael Chermside
In the discussion over class decorators, Jim Jewett writes: I have often started with a function, and ended up replacing it with a callable object so that I could save state without resorting to defalt args or worse. I would prefer to decorate these exactly like the functions they replace. I

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Nick Coghlan
Duncan Booth wrote: Surely if you have a cycle what you want to do is to pick just *one* of the objects in the cycle and break the link which makes it participate in the cycle. That should be sufficient to cause the rest of the cycle to collapse with __del__ methods being called from the

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Thomas Wouters
On 3/31/06, Jim Jewett [EMAIL PROTECTED] wrote: The checkins list has been struggling with generator reference leaks;the latest conclusion was that some are unavoidable because of __del__cycles. That was Tim's conclusion, but I wasn't quite done thinking about it ;) That sort of defeats the

Re: [Python-Dev] New-style icons, .desktop file

2006-03-31 Thread Nick Coghlan
Georg Brandl wrote: Hi, some time ago, someone posted in python-list about icons using the Python logo from the new site design [1]. IMO they are looking great and would be a good replacement for the old non-scaling snakes on Windows in 2.5. Those are *really* pretty. And the

Re: [Python-Dev] Class decorators

2006-03-31 Thread Nick Coghlan
Michael Chermside wrote: In the discussion over class decorators, Jim Jewett writes: I have often started with a function, and ended up replacing it with a callable object so that I could save state without resorting to defalt args or worse. I would prefer to decorate these exactly like the

[Python-Dev] x86 trunk MSI preview

2006-03-31 Thread martin
I just created a snapshot MSI release from the trunk (I actually recreated the 25a0 tag for that, to find that subversion will not update $HeadURL$ automatically when switching branches). Please find the file at http://www.dcl.hpi.uni-potsdam.de/home/loewis/python-2.5.13238.msi Regards, Martin

Re: [Python-Dev] [Python-checkins] Python Regression Test Failures all (1)

2006-03-31 Thread Jeremy Hylton
On 3/1/06, Neal Norwitz [EMAIL PROTECTED] wrote: test_bsddb3 Exception in thread reader 4: Traceback (most recent call last): File /home/neal/python/trunk/Lib/threading.py, line 473, in __bootstrap self.run() File /home/neal/python/trunk/Lib/threading.py, line 453, in run

Re: [Python-Dev] [Python-checkins] Python Regression Test Failures all (1)

2006-03-31 Thread Tim Peters
[Neal Norwitz] test_bsddb3 Exception in thread reader 4: Traceback (most recent call last): File /home/neal/python/trunk/Lib/threading.py, line 473, in __bootstrap self.run() File /home/neal/python/trunk/Lib/threading.py, line 453, in run self.__target(*self.__args, **self.__kwargs)

Re: [Python-Dev] Class decorators

2006-03-31 Thread Phillip J. Eby
At 04:47 AM 3/31/2006 -0800, Michael Chermside wrote: In the discussion over class decorators, Jim Jewett writes: I have often started with a function, and ended up replacing it with a callable object so that I could save state without resorting to defalt args or worse. I would prefer to

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Tim Peters
[Phillip J. Eby] ... As Tim suggested, it'd be better to have the code be generator-specific, at least for now. That had actually been my original plan, to make it generator-specific, but I was afraid of breaking encapsulation in the garbage collector by having it know about generators. It

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Phillip J. Eby
At 12:14 PM 3/31/2006 -0500, Tim Peters wrote: [Phillip J. Eby] ... As Tim suggested, it'd be better to have the code be generator-specific, at least for now. That had actually been my original plan, to make it generator-specific, but I was afraid of breaking encapsulation in the

Re: [Python-Dev] Class decorators

2006-03-31 Thread Fred L. Drake, Jr.
On Friday 31 March 2006 11:52, Phillip J. Eby wrote: class bar: @class foo def __init___(...): ... The more I think about it, the more I like the @class foo syntax. The existing syntax for functions doesn't have anything between the decorators and

Re: [Python-Dev] I'm not getting email from SF when assigned abug/patch

2006-03-31 Thread Brett Cannon
On 3/30/06, Fredrik Lundh [EMAIL PROTECTED] wrote: Brett Cannon wrote: Same here. Please move any more comments about infrastructure to the infrastructure list (http://mail.python.org/mailman/listinfo/infrastructure/). But do realize the committee is not discussing trackers yet. We

[Python-Dev] gmane.comp.python.devel.3000 has disappeared

2006-03-31 Thread Terry Reedy
For about a week, I have been reading and occasionally posting to the new pydev-3000 mailing list via the gmane mirror gmane.comp.lang.devel.3000. Today, it has disappeared and was still gone after reloading their newsgroup list. Was this intentional on the part of the mail list maintainers?

Re: [Python-Dev] gmane.comp.python.devel.3000 has disappeared

2006-03-31 Thread Guido van Rossum
Wasn't my intention. gmane is black magic to me (I've never used it) so I can't be much help debugging this... I did add 3 new admins and changed the list password. --Guido On 3/31/06, Terry Reedy [EMAIL PROTECTED] wrote: For about a week, I have been reading and occasionally posting to the

[Python-Dev] Class decorators

2006-03-31 Thread Jim Jewett
Nick Coghlan wrote: [ much good, including the @instance decorator ] P.S. If all you want is somewhere to store mutable state between invocations, you can always use the function's own attribute space def f(): print Hi world from %s! % f f() Hi world from function f at

Re: [Python-Dev] gmane.comp.python.devel.3000 has disappeared

2006-03-31 Thread skip
Terry For about a week, I have been reading and occasionally posting to Terry the new pydev-3000 mailing list via the gmane mirror Terry gmane.comp.lang.devel.3000. Today, it has disappeared and was Terry still gone after reloading their newsgroup list. Was this Terry

Re: [Python-Dev] I'm not getting email from SF when assigned abug/patch

2006-03-31 Thread Martin v. Löwis
Robert Kern wrote: FWIW: Trac has a Sourceforge bug tracker import script: http://projects.edgewall.com/trac/browser/trunk/contrib/sourceforge2trac.py Apologies: for the other blank reply. That isn't actually worth that much: somebody would need to operate it, too. Mere existence doesn't

Re: [Python-Dev] gmane.comp.python.devel.3000 has disappeared

2006-03-31 Thread Barry Warsaw
On Fri, 2006-03-31 at 15:13 -0500, Terry Reedy wrote: For about a week, I have been reading and occasionally posting to the new pydev-3000 mailing list via the gmane mirror gmane.comp.lang.devel.3000. Today, it has disappeared and was still gone after reloading their newsgroup list. Was

[Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Jim Jewett
Duncan Booth wrote: Surely if you have a cycle what you want to do is to pick just *one* of the objects in the cycle and break the link which makes it participate in the cycle. No, I really meant to do them all. I was trying to avoid creating an attractive nuisance. In

Re: [Python-Dev] gmane.comp.python.devel.3000 has disappeared

2006-03-31 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Wasn't my intention. Good ;-) gmane is black magic to me (I've never used it) so I can't be much help debugging this... I did add 3 new admins and changed the list password. Since one of the last messages I read

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Greg Ewing
Nick Coghlan wrote: Generators are even more special, in that they only require finalisation in the first place if they're stopped on a yield statement inside a try-finally block. I find it rather worrying that there could be a few rare cases in which my generators cause memory leaks,

Re: [Python-Dev] Class decorators

2006-03-31 Thread Nick Coghlan
Jim Jewett wrote: Nick Coghlan wrote: [ much good, including the @instance decorator ] P.S. If all you want is somewhere to store mutable state between invocations, you can always use the function's own attribute space def f(): print Hi world from %s! % f f() Hi

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Nick Coghlan
Greg Ewing wrote: Nick Coghlan wrote: Generators are even more special, in that they only require finalisation in the first place if they're stopped on a yield statement inside a try-finally block. I find it rather worrying that there could be a few rare cases in which my generators

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Greg Ewing
Nick Coghlan wrote: from contextlib import closing with closing(itr): # Use the iterator in here as you wish # secure in the knowledge it will be # cleaned up promptly when you are done # whether it is a file, a generator or # something with a database connection for