Python 3.15 and 3.10 EOL: Scheduled Interpreter Updates

Python 3.15 adds lazy imports via PEP 810, while 3.10 support ends; learn the business impact and how to update your stack on schedule.

  • What Python 3.15 brings
  • Why Businesses Need Lazy Imports
  • What the end of support for 3.10 means
  • How We Upgrade the Stack

Trigger

Python 3.15 was released in October, and Python 3.10 reached the end of its five-year support period in the same month. Simon Willison, the author of Datasette and dozens of open-source libraries, summarized So now he can use 3.11 features in his projects. A company whose business logic is written in Python should draw one rule from these two events: plan interpreter upgrades by calendar.

A team that postpones it until an incident occurs loses speed, security fixes, and access to new library versions.

What Python 3.15 brings

  1. This year's What's new guide was prepared by

  2. Hugo van Kemenade, release manager for versions 3.14 and 3.15.

  3. What Willison looked forward to most was explicit lazy imports from PEP 810: ```python lazy import json lazy from pathlib import Path ```

  4. The interpreter registers the name but loads the module only when it is first accessed.

  5. If the program does not reach `json` during that run, the module will not load.

  6. The second notable new feature is a profiler that attaches to an already running process by PID.

  7. That same day, Willison released datasette-ports 0.4: the plugin finds Datasette instances running on the machine and now displays each PID, making it easier to attach a profiler.

  8. The library maintainer spent only a few hours supporting the new feature, which is typically what an ecosystem prepared for a release in advance looks like.

Why Businesses Need Lazy Imports

  1. Startup time matters where a process starts frequently and runs briefly: CLI tools, cron jobs, serverless functions, and tools an AI agent calls dozens of times per session.

  2. Heavy libraries such as pandas, cloud-provider SDKs, and LLM clients are imported on every run, even when a particular call does not need them.

  3. The `python -X importtime` command shows how much this costs in your code.

  4. Measure first, then promise a speedup: the result depends heavily on the project.

  5. Before PEP 810, teams hid imports inside functions.

  6. The technique worked, but it reduced readability, confused linters, and scattered dependencies throughout the file.

  7. Now the dependency is declared at the beginning of the module, while loading time is spent only when it is used. The mechanism has a risk you should understand before migrating.

  8. Lazy import defers import errors and module side effects until the first access.

  9. If a library registers plugins or patches standard functions during import, the program's behavior will change.

  10. A broken dependency used to crash the process at startup; now it will fail in production on a rare code path.

  11. That is why `lazy` is introduced together with tests that exercise these branches.

Map out your integration landscape

What the end of support for 3.10 means

  1. Each Python version receives five years of fixes, with only security fixes in the final years. Starting in October 2026, 3.10 will not receive those either.

  2. Library maintainers such as Willison are removing 3.10 from their tests and adopting 3.11 syntax. A company that remains on 3.10 will gradually become stuck on old dependency versions and have to address vulnerabilities on its own. There are also direct losses.

  3. According to python.org, Python 3.11 is on average about 25% faster than 3.10 thanks to the Faster CPython project.

  4. Version 3.11 was released in October 2022. A team still running 3.10 has gone four years without benefiting from a performance boost that requires no business-logic rewrite. Python 3.11 also introduced exception groups with `except*`, the built-in `tomllib` TOML parser, and error messages showing the exact location in a line.

  5. The latter reduces incident investigation time.

How We Upgrade the Stack

At KT.Team, Python powers integration services: connectors to 1C and marketplaces, Apache Kafka consumers, RAG pipelines, and the LLM & Security Gateway.

Our editorial agent, news-machine, is also a Python process; systemd starts it on a timer several times a day. For long-running services such as Kafka consumers, the interpreter version affects throughput and CPU usage. For short-lived processes such as news-machine and CLI tools, startup time matters as well.

This is our process. ### CI Matrix for Two Versions

Tests run on the minimum supported and latest Python versions

On the day of a new release, we add it to the matrix, so incompatibilities become visible before migration is required. ###

Post-release migration window In October, the release arrives; in November and December, we migrate the services. We remove the version reaching end of support from production before its support end date. ### Before-and-after measurements

We measure `importtime`, response time, and memory usage.

If the metric did not change, we still got an answer: the bottleneck is elsewhere, so there is no reason to spend time on startup. ### Agents for Migration Routine

AI agents replace deprecated APIs, update configurations, and run tests across dozens of repositories under an engineer's supervision.

Around the same time, Willison built the small web-edit application from his phone through Codex to edit files containing secrets without sending them to the model.

The engineer delegates mechanical work to the agent but decides personally what goes into production.

Conclusion

`lazy import json` takes one line, but behind it are a CI matrix, tests for rare branches, startup measurements, and a migration schedule. Without such a process, a company gets new language features years late and risks a security incident on an unsupported version. A team with a well-established process will test dependencies on 3.15 this quarter, migrate services, and calculate how many milliseconds and rubles the upgrade saved.

Discuss the article: Python 3.15 and the End of 3.10: Upgrade…

Enter your email or phone number so we can get back to you.

Send via: