Yury Selivanov <yseliva...@gmail.com> added the comment:

So the problem was that _PyGen_Finalize wasn't issuing any warnings if there's 
any error set in the current tstate.  And in Nathaniel's case, the current 
error was an AttributeError('__aexit__').

This check is weird, because right before raising the warning, we call 
PyErr_Fetch to temporarily reset the current exception if any, specifically to 
raise the warning :)

The PR just removes the check.  Unless I'm missing something this should fix 
the issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32703>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to