Long story short: in async world every IO library should use asyncio. Unfortunately for the most popular libraries (requests, django, flask, sqlalchemy etc.) it's impossible to rewrite the code keeping backward compatibility. Much easier to create a new library than rewrite existing one.
Regarding to gevent -- please read excellent Glyph's article 'Unyielding': https://glyph.twistedmatrix.com/2014/02/unyielding.html It covers pretty well why explicit yield points are better than implicit ones. Shortly explicit `await`'s give you 'atomic consistency' but using gevent you should expect context switch in every opcode instruction. It's much easier to test cover code with several (ok, many) context switch points. But test covering the code which may switch on every line and several times in the same line is practically impossible. Also my 2 cents. We used gevent. Even in very tiny application (command line client to upload huge files over HTTP, about 1k lines of code) under high load we got reports about gevent hub crashes. Even gevent core (hub is something like asyncio loop) is not 100% stable. Unfortunately we was not able to reproduce the problem by our test suite -- it requires really high load and occurs very rare. Well, the most gevent users can live with that -- gunicorn just restarts dead worker and that's it. But it is the sign for the problem: gevent crashes are extremely hard to debug. P.S. You might keep my writings about gevent as my private opinion, and it is. But from my perspective asyncio based solutions have much more predictable behavior and much more friendly to debug-and-fix problems. -- Thanks, Andrew Svetlov
_______________________________________________ Async-sig mailing list Async-sig@python.org https://mail.python.org/mailman/listinfo/async-sig Code of Conduct: https://www.python.org/psf/codeofconduct/