Debugging asynchronous programs in Python
07-14, 15:30–16:00 (Europe/Dublin), Liffey A

Recently the interest in asynchronous programming has grown dramatically.
Unfortunately, asynchronous programs do not always have reproducible behavior. Even when they are run with the same inputs, their results can be radically different.
In this talk I'll show you different approaches on how to debug asynchronous programs in Python.


Luckily, when it comes to debugging asynchronous applications in python, we have a couple of options to consider. The writers of the asyncio module have very kindly provided a debug mode, which is quite powerful and can really aid us in our debugging adventures without the overhead of modifying the system's code base too dramatically. In particular I'll show you what asyncio debug mode means for developers, and how to source tracebacks for unhandled exceptions in futures. Also how to detect accidental blocking for I/O. We discuss how to monitor the asyncio event loop and collect metrics in statsD.
Finally we discuss monitor and cli capabilities for asyncio applications based on aiomonitor and aioconsole. Also we discuss how asynchronous python works in REPL via autoawait based on ipython and how to do it in vanilla python REPL.


Expected audience expertise: Domain

some

Expected audience expertise: Python

expert

Abstract as a tweet

In this talk I'll show you different approaches on how to debug asynchronous programs in Python.

Hi there! I’m Pythonista from Ukraine, I'm working remotely as a Senior Software Engineer at Astronomer. Also I'm a speaker at many PyCons and meetups around the globe. In my free time I’m crossFit and gymnastic amateur.