This code appears to re-raise an exception, but the return in the finally block silently swallows it. Python 3.14 now warns you about this subtle bug.
If you're using Ruff, the jump-statement-in-finally (B012) rule has caught these issues for a while, though it's not enabled by default. Consider enabling it to catch these problems across all Python versions.
Deprecations and Cleanup
Farewell to ByteString (Eventually)
The typing.ByteString and collections.abc.ByteString types have been deprecated since Python 3.9, but they're getting a stay of execution. Originally scheduled for removal in 3.14, they'll now stick around until Python 3.17.
The recommendation is clear: use collections.abc.Buffer (available since Python 3.12) or the typing_extensions.Buffer backport for earlier versions. For simple cases, a union like bytes | bytearray | memoryview works perfectly.
Ruff's byte-string-usage (PYI057) rule can help you identify and update usage of these deprecated types.
Enhanced Developer Experience
REPL Improvements
Building on the excellent improvements in Python 3.13, the Python 3.14 REPL adds:
- Syntax Highlighting: Code is now color-coded as you type
- Import Autocompletion: The REPL helps you complete import statements
- Better Introspection: Combined with new APIs like functools.Placeholder and concurrent.futures.InterpreterPoolExecutor
These improvements make the REPL an even more powerful tool for exploration and rapid prototyping.
Python 3.9 Reaches End of Life
With Python 3.14's release, Python 3.9 (released October 5, 2020) reaches the end of its five-year support window. After a final release this month, Python 3.9 will no longer receive security updates.
Ruff v0.14 reflects this transition by updating its default target version from 3.9 to 3.10 (though this only applies if you haven't explicitly configured a version). The minimum supported Python version in Ruff remains at 3.7.
While uv will continue to support Python 3.9, no new builds will be published after the final release.
What This Means for You
Python 3.14 represents more than just an incremental update - it's a statement about Python's future direction. The maturation of free-threaded Python signals a commitment to performance and modern concurrency patterns. Template strings provide powerful new abstractions for common patterns. Performance improvements make your code faster without any changes.
Should You Upgrade?
As with any major release, the decision to upgrade depends on your specific situation:
- New Projects: Absolutely start with Python 3.14 to take advantage of all the new features
- Existing Projects: Evaluate based on your dependencies' compatibility and whether you can benefit from new features
- Libraries: Test thoroughly but consider adopting new features behind version checks
Next Steps
- Experiment with t-strings to see where they might simplify your code
- Test your multi-threaded applications with the free-threaded build
- Enable Ruff rules like B012 and PYI057 to prepare for new warnings and deprecations
- Explore the enhanced REPL for daily development tasks
- Plan your migration away from Python 3.9 if you haven't already
Conclusion
Python 3.14 is a landmark release that pushes the language forward in meaningful ways. The addition of template strings provides new tools for elegant solutions to common problems. The maturation of free-threaded Python opens doors to performance improvements that were previously out of reach. Combined with performance optimizations, improved developer tools, and thoughtful deprecations, this release strengthens Python's position as a language that grows and evolves with the needs of its community.
The Python team's methodical approach to major changes like GIL removal demonstrates a commitment to stability while still pushing boundaries. This balance is what makes Python such a reliable choice for everything from quick scripts to large-scale applications.
Now is the perfect time to dive into Python 3.14 and discover how these new features can improve your code. The future of Python is here, and it's looking brighter than ever.