Hudson River Trading

Inside HRT’s Python Fork: Leveraging PEP 690 for Faster Imports

Aug 8, 2025ndepalo
Inside HRT’s Python Fork: Leveraging PEP 690 for Faster Imports
SummaryAI, from the source post

This post details HRT's full adoption of lazy imports by forking CPython 3.10 and later upgrading to 3.12. It explains the mechanism of lazy imports, the challenges encountered during migration (late/missing side-effects, import ordering, implicit transitive imports), and the benefits realized in command-line tools, Jupyter notebooks, and distributed compute frameworks. HRT also proposes a future PEP with an explicit 'lazy' keyword.

More from the Python Lazy Imports trail