Re: Relying on __del__ for cleanup

2010-11-07 Thread Chris McDonough
On Sun, 2010-11-07 at 18:16 -0500, Chris McDonough wrote: > On Sun, 2010-11-07 at 15:06 -0800, Mike Orr wrote: > > On Sun, Nov 7, 2010 at 2:48 PM, Mike Orr wrote: > > > On Sun, Nov 7, 2010 at 2:11 PM, Marius Gedminas wrote: > > >> (I have to say that document surprised me -- pleasantly -- due to

Re: Relying on __del__ for cleanup

2010-11-07 Thread Chris McDonough
On Sun, 2010-11-07 at 15:06 -0800, Mike Orr wrote: > On Sun, Nov 7, 2010 at 2:48 PM, Mike Orr wrote: > > On Sun, Nov 7, 2010 at 2:11 PM, Marius Gedminas wrote: > >> (I have to say that document surprised me -- pleasantly -- due to your > >> dedication for user support. Python 2.4, even!) > > > >

Re: Relying on __del__ for cleanup

2010-11-07 Thread Chris Rossi
On Sun, Nov 7, 2010 at 5:48 PM, Mike Orr wrote: > On Sun, Nov 7, 2010 at 2:11 PM, Marius Gedminas wrote: > > (I have to say that document surprised me -- pleasantly -- due to your > > dedication for user support. Python 2.4, even!) > > 2.4 and 2.5 combatibility will impede the switch to Python

Re: Relying on __del__ for cleanup

2010-11-07 Thread Mike Orr
On Sun, Nov 7, 2010 at 2:48 PM, Mike Orr wrote: > On Sun, Nov 7, 2010 at 2:11 PM, Marius Gedminas wrote: >> (I have to say that document surprised me -- pleasantly -- due to your >> dedication for user support.  Python 2.4, even!) > > 2.4 and 2.5 combatibility will impede the switch to Python 3,

Re: Relying on __del__ for cleanup

2010-11-07 Thread Mike Orr
On Sun, Nov 7, 2010 at 2:11 PM, Marius Gedminas wrote: > (I have to say that document surprised me -- pleasantly -- due to your > dedication for user support.  Python 2.4, even!) 2.4 and 2.5 combatibility will impede the switch to Python 3, as well as disallowing 2.6isms which has been the curren

Re: Relying on __del__ for cleanup

2010-11-07 Thread Marius Gedminas
On Sun, Nov 07, 2010 at 12:34:03PM -0500, Chris McDonough wrote: > On Sun, 2010-11-07 at 19:17 +0200, Marius Gedminas wrote: > > On Sun, Nov 07, 2010 at 04:11:19PM +0200, Marius Gedminas wrote: > > > http://docs.pylonshq.com/pyramid/dev/narr/urldispatch.html#cleaning-up-after-a-request > > > > > >

Re: Relying on __del__ for cleanup

2010-11-07 Thread Chris McDonough
On Sun, 2010-11-07 at 19:17 +0200, Marius Gedminas wrote: > On Sun, Nov 07, 2010 at 04:11:19PM +0200, Marius Gedminas wrote: > > http://docs.pylonshq.com/pyramid/dev/narr/urldispatch.html#cleaning-up-after-a-request > > recommends this for running cleanup code after request processing: > > > <...>

Re: Relying on __del__ for cleanup

2010-11-07 Thread Marius Gedminas
On Sun, Nov 07, 2010 at 04:11:19PM +0200, Marius Gedminas wrote: > http://docs.pylonshq.com/pyramid/dev/narr/urldispatch.html#cleaning-up-after-a-request > recommends this for running cleanup code after request processing: > <...> > > I'm uneasy about the __del__. If used, it would prevent peopl

Relying on __del__ for cleanup

2010-11-07 Thread Marius Gedminas
http://docs.pylonshq.com/pyramid/dev/narr/urldispatch.html#cleaning-up-after-a-request recommends this for running cleanup code after request processing: from mypackage.sql import DBSession class Cleanup: def __init__(self, cleaner): self.cleaner = cleaner def