[issue31213] __context__ reset to None in nested exception

2021-04-19 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31213] __context__ reset to None in nested exception

2021-01-08 Thread Irit Katriel
Irit Katriel added the comment: This seems to be deliberately done here in order to prevent context cycles from forming: https://github.com/python/cpython/blob/fe6e5e7cfd68eeaa69fd1511f354a1b4d8d90990/Python/errors.c#L148 In your code you are creating a cycle where foo is the context (and

[issue31213] __context__ reset to None in nested exception

2020-06-06 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31213] __context__ reset to None in nested exception

2017-08-15 Thread Christopher Stelma
Christopher Stelma added the comment: crosslink to related future lib issue that led me to this: https://github.com/PythonCharmers/python-future/issues/141 -- ___ Python tracker

[issue31213] __context__ reset to None in nested exception

2017-08-15 Thread Christopher Stelma
New submission from Christopher Stelma: When I try to re-raise an exception with a __cause__ inside a nested exception, the __context__ of the outer __context__ appears to be reset to None. e.g. >>> try: ... try: ... raise Exception('foo') ... except Exception as foo: ...