__exit__ not called in certain cases

I reported https://bugs.pypy.org/issue1126 which shows that __exit__ is not called in certain cases when I think it should be. The code to reproduce the bug is there. The code works on CPython. It was closed as invalid saying this is a GC issue, but I don't think it is. This is about __exit__, not __del__. __exit__ should be always called if __enter__ succeeds.

2012/4/11 Hong Minhee <minhee@dahlia.kr>:
I reported https://bugs.pypy.org/issue1126 which shows that __exit__ is not called in certain cases when I think it should be. The code to reproduce the bug is there. The code works on CPython.
It was closed as invalid saying this is a GC issue, but I don't think it is. This is about __exit__, not __del__. __exit__ should be always called if __enter__ succeeds.
It is about GC, because the GC is responsible for calling __exit__ here. -- Regards, Benjamin
participants (2)
-
Benjamin Peterson
-
Hong Minhee