[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2014-01-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: The last tracker message msg207926 is applicable to issue #19097 and not here. Sorry for the confusion. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2014-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3e49868cfd0 by Senthil Kumaran in branch '3.3': Issue #19092 - Raise a correct exception when cgi.FieldStorage is given an http://hg.python.org/cpython/rev/a3e49868cfd0 New changeset 1638360eea41 by Senthil Kumaran in branch 'default': merge from

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-10-01 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092 ___ ___ Python-bugs-list

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 423736775f6b by Nick Coghlan in branch '3.3': Close #19092: ExitStack now reraises exceptions from __exit__ http://hg.python.org/cpython/rev/423736775f6b New changeset 451f5f6151f5 by Nick Coghlan in branch 'default': Merge #19092 from 3.3

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-29 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Indeed, that works, thanks. Here is the updated patch for review, passing all tests. -- Added file: http://bugs.python.org/file31908/exitstack.diff ___ Python tracker rep...@bugs.python.org

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-28 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Here is the updated patch, with a very minor improvement (no longer unnecessarily holds on to original exc_info), and with new tests. The tests test for the non-suppression of exit-exception (which fails without the fix) and for the correct suppression of

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: Moving the context fixing into an exception handler may work. Something like: try: raise exc[1] except BaseException as fix_exc: ... raise -- ___ Python tracker rep...@bugs.python.org

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-26 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Nick, thanks for the review. Do you need me to write the patch for the test suite along with the original patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-26 Thread Nick Coghlan
Nick Coghlan added the comment: That would be very helpful! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092 ___ ___ Python-bugs-list

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-25 Thread Hrvoje Nikšić
New submission from Hrvoje Nikšić: While using contextlib.ExitStack in our project, we noticed that its __exit__ method of contextlib.ExitStack suppresses the exception raised in any contextmanager's __exit__ except the outermost one. Here is a test case to reproduce the problem: class Err:

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-25 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092 ___ ___ Python-bugs-list

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092 ___ ___ Python-bugs-list mailing

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-09-25 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, as indicated by the patch, looks like just a bug with the location of the raise in the stack emulation. The contextlib tests will also need a new test case to cover this, as well as one to cover such an exception being suppressed by an outer manager.