Contribute Media
A thank you to everyone who makes this possible: Read More

mypy: Getting to Four Million Lines of Typed Python

Description

This talk was presented at PyBay2019 - 4th annual Bay Area Regional Python conference. See pybay.com for more details about PyBay and click SHOW MORE for more information about this talk.

Description Dropbox is a heavy user of the mypy type checker, recently passing four million lines of type-annotated Python code, with over half of that added in the last eighteen months. Type checking is helping find bugs, making code easier to under stand, enabling refactors, and is an important aid to our ongoing Python 3 migration.

In this talk, we discuss how we got there. We’ll talk about what we tried in order to get our engineers to type annotate their code—what worked, what didn’t, and what our engineers had to say about it.

Additionally, we’ll discuss the performance problems we faced as the size of our checked codebase grew, and the techniques we employed to allow mypy—which is implemented in Python—to efficiently check (faster than a second, for most incremental checks) millions of lines of code, which culminated in mypyc, a new ahead-of-time compiler for type-annotated Python!

About the speaker Michael is a recovering academic with an unfortunate fondness for indefensible hacks. He works at Dropbox on the mypy and mypyc projects.

Sponsor Acknowledgement This and other PyBay2019 videos are via the help of our media partner AlphaVoice (https://www.alphavoice.io/)!

#pybay #pybay2019 #python #python3 #gdb

Details

Improve this page