I've now encountered an issue I believe that PEP 533 was intended to
address:

When an asynchronous context manager is created within an asynchronous
generator, if the generator is not iterated fully, the context manager
will not exit until the event loop cancels the task by raising
a CancelledError, long after the context manager is assumed to be out
of scope. Per PEP 525, I can call aclose coroutine method to cleanup
the generator, but it requires the code iterating to be aware that that
closing the generator is necessary. 

Any appetite for putting PEP 533 back on the table to address this
issue?

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/AM277CEKUEDGGIWYY3QSKYPW5OEICFGQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to