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 ncoghlan
Recipients JelleZijlstra, giampaolo.rodola, gvanrossum, ncoghlan, rhettinger, vstinner, yselivanov
Date 2017-03-01.05:11:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488345089.09.0.0120466396003.issue29679@psf.upfronthosting.co.za>
In-reply-to
Content
It's probably worth a python-dev discussion, but I personally draw the line at "Does this need to import 'asyncio'?". If it does, then that's a clear dependency inversion, and the functionality doesn't belong in a relatively low level module like contextlib.

If it doesn't, then I think the potentially tricky part of this kind of code is the way it interacts with the execution stack and the context management machinery, so it makes sense for it to live in contextlib and have a design and review process that's closely aligned with that for the corresponding synchronous APIs.

That said, one of my review comments on the PR was that the new test cases should be split out to their own file to avoiding making the existing tests depend on asyncio, which I'd consider a point in favour of adding an `asyncio.contextlib` module instead of adding these APIs directly to contextlib.
History
Date User Action Args
2017-03-01 05:11:29ncoghlansetrecipients: + ncoghlan, gvanrossum, rhettinger, vstinner, giampaolo.rodola, yselivanov, JelleZijlstra
2017-03-01 05:11:29ncoghlansetmessageid: <1488345089.09.0.0120466396003.issue29679@psf.upfronthosting.co.za>
2017-03-01 05:11:29ncoghlanlinkissue29679 messages
2017-03-01 05:11:28ncoghlancreate