What Are the Most Important Changes in Python 3.15?

0
0
Asked By MellowPine42 On

Python 3.15 has reached Release Candidate 1, with the final release currently expected on October 1, 2026. I reviewed the changes and pulled out the features that seem most relevant to everyday development: opt-in lazy imports, UTF-8 as the default encoding for I/O operations without an explicit encoding, a built-in immutable mapping type, continued JIT improvements, the new low-overhead Tachyon sampling profiler, terminal and sqlite3 CLI improvements, and ongoing work on the opt-in free-threaded build.

This feels more like a performance, tooling, and developer-experience release than a major change to Python's programming model. Since the feature set should be mostly settled at RC1, has anyone tested it with real projects? I'm especially interested in whether lazy imports cause compatibility issues with frameworks or libraries that depend on import-time side effects, dynamic imports, or initialization order.

4 Answers

Answered By CobaltRaven7 On

The biggest thing to keep in mind is that lazy imports are opt-in, so existing statements such as regular imports should continue behaving as before. That said, projects using import-time registration, side effects, or carefully controlled initialization order should test lazy imports separately before adopting them.

Answered By NorthstarElm5 On

Tachyon sounds particularly practical because a low-overhead sampler that can attach to an already-running process makes production investigation easier. It is worth comparing with tools such as py-spy for capabilities, permission requirements, and overhead rather than assuming it replaces every existing profiler.

Answered By AmberQuill29 On

The UTF-8 change is useful, but it does not mean every Python string was previously using a platform encoding. The practical difference is mainly for I/O calls such as open() when no encoding is specified. Those calls could use the system or locale encoding before, which often caused cross-platform surprises. Explicitly specifying UTF-8 is still a reasonable habit when supporting older Python versions or making intent obvious.

SilverMaple8 -

That is especially noticeable for people who learned Python on Windows, where the default locale encoding has often differed from UTF-8. The new default should remove one common source of portability bugs.

Answered By BriskWillow31 On

The free-threaded build remaining opt-in seems sensible. It is becoming more mature and the ABI work should help extension authors, but package and C-extension compatibility still matters. For the release candidate, test your dependency stack rather than assuming every package is ready, and remember that release-candidate failures are exactly what testing is meant to uncover.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.