Dropbox

How we rolled out one of the largest Python 3 migrations ever

Sep 25, 2018Max Bélanger
How we rolled out one of the largest Python 3 migrations ever
SummaryAI, from the source post

This post details the planning, execution, and rollout of Dropbox's Python 3 migration for its desktop application. Key technical contributions include: architecting a new system to embed the Python runtime within native applications, moving away from 'freezer' scripts to use platform-specific tooling (Visual Studio, Xcode, make) for building binaries; packaging Python bytecode into ZIP archives and managing native extensions; isolating the Python interpreter using `Py_SetPath`; and implementing a gradual rollout strategy ('Hydra') allowing both Python 2 and 3 to coexist by dynamically linking against different Python runtimes controlled by command-line arguments and the Stormcrow feature-gating system. The migration also highlights the benefits of Python 3 features like type annotation syntax (supporting MyPy) and coroutine syntax (`async`/`await`).

More from the Python Static Type Checking trail