Closed RonnyPfannschmidt closed 2 weeks ago
cpython impl ref in contextmanager
a test in one of my testsuites failed with a StopIteration as exception
this ran into issues as new style hook wrappers dont manage the RuntimeError of stopIteration
>>> def mygen(): yield ... >>> gen = mygen() >>> next(gen) >>> e = StopIteration() >>> try: ... gen.throw(e) ... except Exception as err: ... runtime = err ... >>> runtime RuntimeError('generator raised StopIteration') >>> runtime. runtime.add_note( runtime.args runtime.with_traceback( >>> runtime.a runtime.add_note( runtime.args >>> runtime.args ('generator raised StopIteration',) >>> runtime.__cause__ StopIteration() >>> runtime.__cause__ is e True >>>
cpython impl ref in contextmanager
a test in one of my testsuites failed with a StopIteration as exception
this ran into issues as new style hook wrappers dont manage the RuntimeError of stopIteration