Python 3.13, what didn't make the headlines
Python 3.13 features improvements in PDB, bug fixes in shutil, and new annotation syntax for comprehensions and lambdas, but overall performance gains are minimal and some deprecated features may disrupt existing code.
Read original articlePython 3.13 has introduced several notable improvements and features, although it has not significantly increased performance. Key enhancements include a revamped PDB (Python Debugger) with multiline editing, code completion, and better error handling. The shutil module has received numerous bug fixes, making file system operations more reliable. Additionally, the new annotation syntax now supports comprehensions and lambdas, expanding its usability. While there are small victories in concurrency with asyncio improvements, the overall performance gains are minimal, similar to the previous version. Some deprecated features and changes may disrupt existing code, such as alterations to Path.glob() and the removal of certain context manager functionalities. Despite these challenges, Python 3.13 focuses on refining existing features, enhancing error messages, and improving documentation, indicating a commitment to maintaining a stable and user-friendly environment for developers.
- Python 3.13 introduces significant improvements to PDB, enhancing debugging capabilities.
- The shutil module has been updated with bug fixes, making file operations more reliable.
- New annotation syntax allows for greater flexibility with comprehensions and lambdas.
- Performance improvements in Python 3.13 are minimal, similar to version 3.12.
- Some deprecated features may cause compatibility issues with existing code.
Related
What's New in Python 3.13
Python 3.13 introduces a revamped interactive interpreter, experimental free-threaded execution, a JIT compiler, removal of deprecated modules, and official support for mobile platforms, scheduled for release on October 1, 2024.
Python 3.13: Cool New Features for You to Try – Real Python
Python 3.13, releasing on October 7, 2024, features an improved REPL, enhanced error messages, removal of the GIL, and an experimental JIT compiler, aiming to boost performance and user experience.
Python 3.13.0 Is Released
Python 3.13, released on October 7, 2024, features a revamped interpreter, experimental free-threaded execution, a JIT compiler, removal of deprecated modules, and enhanced typing capabilities for improved performance and usability.
Python 3.13.0
Python 3.13.0 was released on October 7, 2024, featuring an improved interactive interpreter, experimental JIT, updated macOS support, removal of deprecated modules, and enhanced type annotations for better checking.
What's New in Python 3.13
Python 3.13, released on October 7, 2024, features a new interactive interpreter, improved error messages, a JIT compiler, free-threaded execution, and enhanced support for mobile platforms.
For example, 3.12 changed the byte code list comprehensions use, citing faster performance. In my tests, this is only true with small lists, and as soon as you get to a large number of items (~10K), it falls off a cliff. While large lists are probably not the norm, to have that completely ignored is maddening.
The 3.13 REPL is nice, I’ll give them that.
Unsurprising. Attention to internals has been split by the GILectomy - I guess some people expected automatic gains from that, but that seemed unwarranted to me. It's normal for performance improvements in Python to be incremental (also in terms of memory efficiency - e.g. https://github.com/zahlman/python-dict-stats/), with here and there a big gain for a specific task (e.g. `math.factorial` getting a better algorithm in 3.x - https://stackoverflow.com/questions/9815252).
There also isn't generally a huge amount of pressure for these kinds of optimizations, given typical Python use cases. People who need performance are often already using a Python binding to code written in another language anyway.
> Ditto for zipfile.Path, a pathlib-compatible wrapper for traversing zip files you didn't know existed since 3.8. And you didn't know it because it sucked, frankly. But 3.13 brings many QoL patches to it, and improves a lot on how it handles directories, which used to require a lot of manual labor. So I expect it will see more use from now on.
It'd be nice if the various archive-handling libraries offered more of a common interface, including that sort of wrapper. BTW, Barney Gale (the dev primarily responsible for `pathlib`) is relatively active on https://discuss.python.org and generally a joy to talk with.
Related
What's New in Python 3.13
Python 3.13 introduces a revamped interactive interpreter, experimental free-threaded execution, a JIT compiler, removal of deprecated modules, and official support for mobile platforms, scheduled for release on October 1, 2024.
Python 3.13: Cool New Features for You to Try – Real Python
Python 3.13, releasing on October 7, 2024, features an improved REPL, enhanced error messages, removal of the GIL, and an experimental JIT compiler, aiming to boost performance and user experience.
Python 3.13.0 Is Released
Python 3.13, released on October 7, 2024, features a revamped interpreter, experimental free-threaded execution, a JIT compiler, removal of deprecated modules, and enhanced typing capabilities for improved performance and usability.
Python 3.13.0
Python 3.13.0 was released on October 7, 2024, featuring an improved interactive interpreter, experimental JIT, updated macOS support, removal of deprecated modules, and enhanced type annotations for better checking.
What's New in Python 3.13
Python 3.13, released on October 7, 2024, features a new interactive interpreter, improved error messages, a JIT compiler, free-threaded execution, and enhanced support for mobile platforms.