[issue1705170] contextmanager eats StopIteration

2007-10-31 Thread Mike Klaas
Mike Klaas added the comment: Verified on 2.5.0. The problem stems from contextmanager.__exit__: def __exit__(self, type, value, traceback): if type is None: try: self.gen.next() except StopIteration: return else:

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Changes by Nick Coghlan: -- assignee: -> ncoghlan _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: h

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.6 in rev 58766. I'm not sure if it will be possible to get this into 2.5.2. Leaving open against 2.5 until it is checked in on the maintenance branch. -- components: +Library (Lib) -None resolution: -> accepted versions: +Python 2.5

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Close, but not quite. The problem is that the 'value' argument may be None if instantiation of the exception hasn't been forced before __exit__ gets called. >>> class TestWith(object): ... def __enter__(self): ... pass ... def __exit__(self, exc_type, exc_

[issue1705170] contextmanager eats StopIteration

2007-11-06 Thread Neal Norwitz
Neal Norwitz added the comment: Nick, can you backport this and add a NEWS entry? Thanks. -- nosy: +nnorwitz _ Tracker <[EMAIL PROTECTED]> _ ___

[issue1705170] contextmanager eats StopIteration

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Done in rev 58901 -- resolution: accepted -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> _ ___