Python News (May)
A month went by since I started writing these posts, so let’s do another news round to celebrate!
What’s new in Python
Version 3.13.3 came out on April the 8th as the third maintenance update of the 3.13
version. It includes 320 merged PRs, and here is a quick overview:
Security Enhancements
- Upgraded bundled libexpat to 2.7.1 to patch vulnerabilities.
- Fixed a spoofing risk in email module (rfc2047 encoded-word parsing).
- Prevented unbounded memory usage in
tempfile.SpooledTemporaryFile.writelines()
.
Free-threaded Build Stabilization
- Numerous data race and crash fixes in
list
/dict
manipulation,locals()
, andset.clear()
. - Improved performance and memory handling in free-threading environments.
- Thread-safe updates in PyList_Insert, PyList_SetItem, and GC functions (more about that in an upcoming post).
Overall, this release focuses on security, macOS/Windows installer updates, thread-safety, REPL improvements, and bug fixes across core, libraries, and tests. It is a maintenance update after all.
Updates in widely-used libraries
Pydantic 2.11 was released and it brings significant performance improvements. According to the official release article, you can expect up to a 2x improvement in schema build times and up to 5x lower total memory allocated. There is now also support for Python’s type parameter lists (introduced in 3.12) and the long-awaited serialize_by_alias
to go along with validate_by_alias
🎉.
New projects
Astral, the creators of uv and ruff, have announced that they are working on a new static type analyzer tool called red-knot
that is slated to replace mypy once released.