Message288736
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. |
|
Date |
User |
Action |
Args |
2017-03-01 05:11:29 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, rhettinger, vstinner, giampaolo.rodola, yselivanov, JelleZijlstra |
2017-03-01 05:11:29 | ncoghlan | set | messageid: <1488345089.09.0.0120466396003.issue29679@psf.upfronthosting.co.za> |
2017-03-01 05:11:29 | ncoghlan | link | issue29679 messages |
2017-03-01 05:11:28 | ncoghlan | create | |
|