Yury Selivanov

Python core developer. Worked on adding async/await to Python, lead maintainer of asyncio, creator of uvloop & asyncpg packages. CEO of egdedb.com.

Speaker home page

asyncio: what's next

Python & Libraries, Intermediate
8/18/2018 | 3:45 PM-4:30 PM | House Canary

Description

A quick recap of what's new in asyncio in Python 3.7. A look at what features and capabilities we can expect to have in asyncio in Python 3.8 and beyond.

Abstract

There are some new advanced features in asyncio 3.7 that are worth mentioning: new buffered protocol, start TLS, sendfile, and many other enhancements. The new buffered protocol is especially interesting as it allows to implement protocols with better performance than if was possible before, with less code.

With PEP 567 we now have a new Context API in Python and asyncio. It allows to implement advanced tracing (zipkin, statsd, etc) and error reporting in your application, monitoring everything from costs of high-level application logic code to the very low-level IO performance.

In Python 3.8 we want to focus on asyncio usability and the robustness of async/await. Particularly, the cancellation logic and timeouts mechanisms need to be redesigned from scratch. Hopefully, closer to August, I'll have a better idea of what we'll be adding to asyncio to make cancellation and timeouts easier to implement and handle correctly.