Re:Python: Generators, Coroutines, Native Coroutines and Asy...
by luhn on Saturday December 05, 2015 @06:40PM
(#10683735)
I think it's a combination of impracticality and lack of motivation that will keep the stdlib largely blocking.
* File IO (`open()`) will remain blocking because there's no practical way to implement it in asyncio. This isn't Python's fault, the OS support is a mess.
* Async Socket IO is already implemented in the stdlib.
* The stdlib HTTP (urllib, urllib2) is pretty awful and I don't know of anybody who uses it, instead they opt for
Requests. aiohttp is the asyncio equivalent of Requests.
* SMTP would be nice to see async.
* SQLite relies on file IO, so is likewise doomed to always block.
I can't think of anything else in the stdlib that is IO-driven.
Edit: sametmax mentioned subprocess, which I had overlooked. That would be a nice one to see.
* File IO (`open()`) will remain blocking because there's no practical way to implement it in asyncio. This isn't Python's fault, the OS support is a mess. * Async Socket IO is already implemented in the stdlib. * The stdlib HTTP (urllib, urllib2) is pretty awful and I don't know of anybody who uses it, instead they opt for Requests. aiohttp is the asyncio equivalent of Requests. * SMTP would be nice to see async. * SQLite relies on file IO, so is likewise doomed to always block.
I can't think of anything else in the stdlib that is IO-driven.
Edit: sametmax mentioned subprocess, which I had overlooked. That would be a nice one to see.