Python 3.15 Is Out and 3.10 Is Retired: A Practical Upgrade Guide for Teams
Python 3.15 brings lazy imports, frozendict, the Tachyon profiler and UTF-8 by default, and Python 3.10 no longer gets security fixes. What changed, what can break and where to start.

Python 3.15 came out on October 9, 2026, and a week earlier, on October 1, Python 3.10 reached end of life. If your scripts, data pipelines or web services still run on 3.10, they no longer get security fixes. That makes this autumn a good moment to plan an upgrade, and 3.15 is a release worth upgrading to: lazy imports, a built-in frozendict, a new sampling profiler and, the change most likely to surprise you, UTF-8 as the default text encoding everywhere.
This guide covers what changed, what can break, and a practical order of work for a team.
Where each Python version stands now
The Python developer guide lists the current support status. Feature releases now ship every October and receive about two years of bugfix releases, then security-only fixes until five years after release.
Version | Status | Released | End of life |
|---|---|---|---|
3.15 | bugfix | October 9, 2026 | October 2031 |
3.14 | bugfix | October 7, 2025 | October 2030 |
3.13 | security | October 7, 2024 | October 2029 |
3.12 | security | October 2, 2023 | October 2028 |
3.11 | security | October 24, 2022 | October 2027 |
3.10 | end of life | October 4, 2021 | October 1, 2026 |
According to the 3.15 release schedule (PEP 790), 3.15.1 and 3.15.2 have already shipped (October 21 and 26), and 3.15.3 is planned for December 1. Many teams wait for the first one or two bugfix releases before moving production; that wait is now over.
If you are on 3.10 or 3.11, you are choosing between 3.14 and 3.15. Both are in full bugfix support. Pick 3.15 if your key dependencies already publish wheels for it; otherwise move to 3.14 now and plan 3.15 for next year.
UTF-8 by default: the change to test first
Until now, open("data.txt") without an encoding argument used the operating system's locale encoding. On Linux and macOS that was usually UTF-8 already. On Windows it was the system code page, and on a Windows machine set to Persian or Arabic that is typically cp1256.
In 3.15, as PEP 686 planned, Python uses UTF-8 regardless of the environment. The What's New page is explicit: this applies only when no encoding argument is given.
What this means in practice:
Code that writes and reads its own files keeps working, and Windows and Linux now behave the same.
Old files written by older Python versions on Windows without an explicit encoding may be in cp1256 or another code page. Reading them in 3.15 can raise
UnicodeDecodeErroror, worse, produce garbled Persian or Arabic text.CSV exports opened in older tools, log files, and config files edited by hand on Windows are the usual suspects.
Three tools help:
Run your test suite on your current Python with
-X warn_default_encoding(orPYTHONWARNDEFAULTENCODING=1). Everyopen()without an encoding emits anEncodingWarning, so you get a list of places to fix.Add an explicit
encoding="utf-8", orencoding="locale"where you really mean the system encoding. Both work on 3.10 and later.As a temporary escape hatch,
PYTHONUTF8=0or-X utf8=0restores the old behaviour. Use it to unblock a release, not as a permanent setting.
Lazy imports: faster startup without moving imports into functions
Large applications and CLI tools often spend most of their startup time importing modules they never use in that run. Until now the fix was to move imports inside functions, which scatters dependencies across the code.
PEP 810 adds the lazy soft keyword:
lazy import json
lazy from pathlib import Path
print("Starting up...") # json and pathlib are not loaded yet
data = json.loads('{"key": "value"}') # json is loaded hereThe module loads the first time the name is used. If loading fails, the error is raised at that point, and the traceback shows both the use and the original import line.
Some rules to know:
lazyis allowed only at module level, not inside functions, classes ortryblocks, and not with*or__future__imports.-X lazy_imports=allorPYTHON_LAZY_IMPORTS=allmakes all imports lazy without changing code, andsys.set_lazy_imports_filter()lets you limit this to your own packages.Libraries that still support older Python can list module names in
__lazy_modules__, so normalimportstatements for those names become lazy on 3.15.
Lazy imports change when a module's top-level code runs. If one of your modules registers plugins or patches something at import time, keep it eager.
New built-ins and syntax you will actually use
frozendict (PEP 814) is an immutable, hashable mapping. It keeps insertion order, compares equal regardless of order, and works with json, pickle, copy and pprint. It is not a subclass of dict, so code that checks isinstance(x, dict) will not accept it; check against collections.abc.Mapping instead. Good uses: configuration loaded once, cache keys, and default arguments that must never change.
Sentinel values (PEP 661) get a built-in sentinel type, replacing the common _MISSING = object() pattern with something that has a readable repr, survives copying and works in type hints.
Unpacking in comprehensions (PEP 798) flattens nested data without itertools.chain:
lists = [[1, 2], [3, 4], [5]]
[*L for L in lists] # [1, 2, 3, 4, 5]
dicts = [{"a": 1}, {"b": 2}, {"a": 3}]
{**d for d in dicts} # {'a': 3, 'b': 2}Profiling and performance
Python 3.15 groups its profilers under a new profiling package. profiling.tracing is the old cProfile (which stays as an alias), and the old pure-Python profile module is deprecated and will be removed in 3.17.
The big addition is Tachyon, a statistical sampling profiler in profiling.sampling. It can attach to a running process by PID without restarting it, samples at up to 1,000,000 Hz, measures wall-clock, CPU, GIL or exception time, and writes flame graphs, heat maps per source line, Firefox Profiler files or a live top-style view. For a slow production service, that removes the need to install a third-party profiler on the server.
The experimental JIT compiler also improved. The core team reports a 7–8% geometric mean speedup over the standard interpreter on x86-64 Linux and 11–12% on AArch64 macOS (against the tail-calling interpreter) in the pyperformance suite, with individual benchmarks ranging from about 15% slower to more than twice as fast. The JIT is still opt-in at build time, so measure your own workload before counting on it.
What can break: a short list
Beyond encoding, the porting notes list several small changes that show up in real code:
argparse: with
add_argument('-f', '-foo'),destis nowfoo, notf. Passdest=explicitly if you depended on the old name.sqlite3: every parameter of
sqlite3.connect()exceptdatabaseis now keyword-only.base64:
urlsafe_b64decode()no longer requires padding; passpadded=Trueif your validation relied on it.unittest:
assertWarns()no longer swallows warnings of other categories, so tests may start printing warnings that were hidden before.Deprecations: modules and functions scheduled for removal in 3.16 and 3.17 are listed on the What's New page. Run your tests with
-W error::DeprecationWarningonce to see them.
For C extension authors, 3.15 adds a Stable ABI for free-threaded builds (abi3t) and enables frame pointers by default; native build systems that ignore Python's compiler flags should add the same flags themselves.
An upgrade plan for teams
Inventory. List every place Python runs: servers, containers, CI images, scheduled jobs, developers' machines. Anything on 3.10 goes to the top.
Check dependencies. Make sure your important packages publish wheels for 3.15 (or 3.14). A missing wheel for a compiled package is the most common blocker.
Find encoding assumptions. Run the suite with
-X warn_default_encodingon your current version and add explicit encodings. Convert old Windows data files.Add 3.15 to CI next to your current version and fix failures and new warnings.
Upgrade one service first, preferably a CLI or a job where lazy imports and the new profiler can show quick wins.
Roll out, then update base images and
requires-pythonso new projects start on the new version.
Sources
What's new in Python 3.15, Python documentation
Status of Python versions, Python Developer's Guide


