O'Reilly logo

Using Asyncio in Python 3 by Caleb Hattingh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Appendix

Short History of Async Support in Python

Despite having been part of the Python standard library for a long time, the asyncore module suffers from fundamental flaws following from an inflexible API that does not stand up to the expectations of a modern asynchronous networking module.

Moreover, its approach is too simplistic to provide developers with all the tools they need in order to fully exploit the potential of asynchronous networking.

The most popular solution right now used in production involves the use of third party libraries. These often provide satisfactory solutions, but there is a lack of compatibility between these libraries, which tends to make codebases very tightly coupled to the library they use.1

Laurens van Houtven, PEP 3153 (May 2011): Asynchronous IO support

The goal of this section is to describe a little of the history behind async programming in Python, and the point I want to make—which still amazes me when I think about it—is that the key innovation that we’ve been awaiting for 20 years was language syntax.

Many people will be surprised by this, but Asyncio is not the first attempt to add support for asynchronous network programming to Python, and this is discussed next.

In the Beginning, There Was asyncore

[Compared to asyncore,] Twisted is better in pretty much every possible way. It’s more portable, more featureful, simpler, more scalable, better maintained, better documented, and it can make a delicious omelette. Asyncore ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required