
The Python core team released Python 3.13.5 on June 11, 2025, an accelerated maintenance update that patches several serious regressions introduced in the previous 3.13.4 release. This isn’t a feature release. It’s a repair job, and an important one for anyone running Python 3.13 in production.
Why Python 3.13.5 Exists
Python 3.13 launched in October 2024 with several major improvements: a revamped interactive shell (REPL), experimental free-threaded mode (no GIL), and a minimal JIT compiler. Since then, maintenance releases 3.13.1 through 3.13.4 added incremental fixes.
But 3.13.4 introduced regressions that broke things for enough developers that the team decided to push 3.13.5 out early rather than wait for the normal release cycle. The Windows extension module build broke under certain configurations, and there were issues with the import system that affected packages relying on namespace packages.
Key Fixes in 3.13.5
Windows Extension Module Build
The most urgent fix addresses a regression in how Python builds C extension modules on Windows. Developers using setuptools, pip, or meson to compile C extensions were hitting build failures on Python 3.13.4. The issue stemmed from a change in how Python 3.13.4 handled the sysconfig paths for extension module compilation, which broke compatibility with several popular build backends.
Python 3.13.5 restores the correct path resolution behavior while keeping the underlying improvements that 3.13.4 intended to make.
Import System Regression
Python 3.13.4 changed how the import system handles certain edge cases with namespace packages (PEP 420). This caused issues with tools like Poetry and PDM that manage virtual environments with custom import paths. If you saw errors like ModuleNotFoundError for packages you know are installed, this fix addresses that.
Security Patches
The release includes security updates in the documentation toolchain and peripheral packages. While documentation is often treated as read-only, vulnerabilities in docstring parsing or rendering tools can be exploited when generating or distributing Python packages. The patches close these attack vectors.
Python 3.13 Features (Stabilized in 3.13.5)
While 3.13.5 doesn’t add new features, it stabilizes several that shipped with the 3.13 line:
- Improved REPL: Multi-line editing, colorized output, and paste mode make the interactive interpreter more usable. The PyPy-inspired design is a major quality-of-life improvement for developers who use the REPL for quick testing.
- Experimental JIT Compiler: Still disabled by default, the minimal JIT laid groundwork for future optimization. Performance gains are modest in 3.13, but the infrastructure is in place for more aggressive optimization in 3.14+.
- Free-Threaded Mode (no GIL): Experimental support for running Python without the Global Interpreter Lock. This is the feature most likely to change Python’s performance profile for CPU-bound workloads in future releases.
- Linux Timer FD Integration: New low-level functions for interacting with Linux’s timer file descriptors, expanding OS-level integration capabilities.
How to Upgrade to Python 3.13.5
If you’re already on Python 3.13.x, upgrading to 3.13.5 is straightforward:
From source:
Download from python.org/downloads, extract, and run ./configure && make && make install
Using pyenv:
pyenv install 3.13.5
Using Homebrew (macOS):
brew upgrade python@3.13
Linux package managers: Check your distribution’s repositories. Ubuntu, Fedora, and Arch typically update within days of a Python release.
Always test your dependencies after upgrading. Run your test suite, check for deprecation warnings, and verify that compiled extensions rebuild correctly.
Frequently Asked Questions
Should I upgrade from Python 3.13.4 to 3.13.5?
Yes, especially if you’re on Windows or using namespace packages. The build and import regressions in 3.13.4 can cause real problems in development and CI/CD pipelines.
Is Python 3.13.5 safe for production?
Python 3.13.5 is specifically designed to be a stable production release. The fixes address regressions, not add experimental features.
What breaks when upgrading from Python 3.12 to 3.13?
Most Python 3.12 code runs on 3.13 without changes. Check for deprecated features that were removed, particularly around the unittest module and some asyncio APIs.
Is the GIL removal in Python 3.13 production-ready?
No. Free-threaded mode (no GIL) is experimental in 3.13 and 3.13.5. It’s useful for testing and compatibility checking, but not recommended for production workloads yet.
When will Python 3.14 be released?
Python 3.14 is expected in October 2025. The alpha releases are already available for testing, and they include a more capable JIT compiler and expanded free-threaded support.
