This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients giampaolo.rodola, gvanrossum, ncoghlan, thehesiod, veky, vstinner, yselivanov
Date 2017-03-01.16:06:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488384376.33.0.709360534789.issue29302@psf.upfronthosting.co.za>
In-reply-to
Content
Looking at the code: we don't need to use iscoroutinefunction at all.  If we had separate methods for sync and async context managers, you can store the flag if a function is async or sync along with it.

So _exit_callbacks should store tuples `(is_async, cb)`, instead of just `cb`.

asyncio.iscoroutinefunction differs from inspect.iscoroutinefunction a little bit to support asyncio-specific debug coroutine wrapper functions.  We should avoid using any version of iscoroutinefunction here.
History
Date User Action Args
2017-03-01 16:06:16yselivanovsetrecipients: + yselivanov, gvanrossum, ncoghlan, vstinner, giampaolo.rodola, thehesiod, veky
2017-03-01 16:06:16yselivanovsetmessageid: <1488384376.33.0.709360534789.issue29302@psf.upfronthosting.co.za>
2017-03-01 16:06:16yselivanovlinkissue29302 messages
2017-03-01 16:06:16yselivanovcreate