Get the latest tech news

Adopting Python 3.15's lazy imports: a 4× faster CLI, and where they didn't help


We deferred imports in a CLI, a terminal UI and an MCP server with PEP 810, behind a static safety gate. One start-up became four times faster; the other two improved by 15 to 20 percent.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of CLI

CLI

Photo of lazy imports

lazy imports

Related news:

News photo

What happens if you write a TCP stack in Python? (2014)

News photo

Python's CVEs Triple. Anthropic Funds a New Security Developer

News photo

Mizu – zero-copy parallel R and Python over shared memory