[pypy-issue] Issue #2047: Contextmanager's (aka `with` block) __exit__ function not always called (pypy/pypy)

Anton Dries issues-reply at bitbucket.org
Wed May 13 17:51:38 CEST 2015


New issue 2047: Contextmanager's (aka `with` block) __exit__ function not always called
https://bitbucket.org/pypy/pypy/issue/2047/contextmanagers-aka-with-block-__exit__

Anton Dries:

In some cases PyPy doesn't execute the __exit__ function of a user-defined context manager.

Problem still persists in latest build (linux64 of 2015-05-13).
Minimal example attached.
	
Expected output (as in CPython) (numbers may vary):
('ENTER', 140373335131152)
('EXIT', 140373335131152)
6

PyPy output:
('ENTER', 139827597959816L)
6





More information about the pypy-issue mailing list