On 2017-03-01 12:42 AM, Nick Coghlan wrote: > Short version: > > - there are some reasonable requests for async variants of contextlib APIs > for 3.7 > - prompted by Raymond, I'm thinking it actually makes more sense to add > these in a new `asyncio.contextlib` module than it does to add them > directly to the existing module > - would anyone object strongly to my asking authors of the affected PRs to > take their changes in that direction? Both asynccontextmanager and AsyncExitStack do not require asyncio is their implementations. Using asyncio as a helper to write tests is totally OK. For example, I use asyncio to test asynchronous generators (PEP 525). async/await is a generic language feature; asyncio is a framework that uses it. Things like asynccontextmanager are framework agnostic, they can be used in programs built with asyncio, Twisted, Tornado, etc. +1 to put both in contextlib. Yury
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4