● LIVE   Breaking News & Analysis
Buconos
2026-05-01
Open Source

Python 3.13.9: Targeted Bug Fix Release Explained

Python 3.13.9 is an expedited release fixing a regression in inspect.getsourcelines when a decorator is followed by a comment or empty line. No other changes.

Python 3.13.9 is now available as an expedited release, addressing a specific regression introduced in the previous version 3.13.8. This minor update focuses on a single fix related to the inspect.getsourcelines function, ensuring it correctly handles scenarios where a decorator is followed by a comment or an empty line. With no other changes compared to 3.13.8, this release is designed for users who encountered this particular issue. Below, we answer common questions about this release, how to get it, and how you can contribute to the Python community.

What is Python 3.13.9 and why was it released?

Python 3.13.9 is an expedited patch release that fixes a regression found in Python 3.13.8. The term "expedited" means the release was made quickly—outside the normal schedule—to address a critical bug without waiting for the next planned update. This release contains exactly one change: a correction to the inspect.getsourcelines function. If you use Python's inspect module to retrieve source code lines of functions or classes, and you have decorators followed by comments or blank lines, you may have encountered errors in 3.13.8. Upgrading to 3.13.9 resolves that problem.

Python 3.13.9: Targeted Bug Fix Release Explained

What specific bug does Python 3.13.9 fix?

The fix is for issue #139783 on the CPython bug tracker. The bug affected inspect.getsourcelines when a decorator (like @staticmethod) was immediately followed by a comment line (starting with #) or an empty line. In those cases, the function would fail or return incorrect source lines. The patch ensures that extra non-code lines after a decorator are properly skipped, so the source retrieval works correctly for any valid Python syntax. This regression was introduced in 3.13.8, so only users of that specific version are affected.

Are there any other changes in Python 3.13.9 compared to 3.13.8?

No. According to the official release notes, Python 3.13.9 contains no other changes besides the single fix for inspect.getsourcelines. That means all other features, bug fixes, and improvements that were part of Python 3.13.8 remain identical. If you skipped 3.13.8 and are upgrading from an earlier version (e.g., 3.13.7), you will receive all the changes from both 3.13.8 and this patch. However, for those already on 3.13.8, this release is a straightforward, low-risk upgrade that only addresses the one known regression.

How can I download and install Python 3.13.9?

You can download Python 3.13.9 from the official Python releases page. Choose the installer appropriate for your operating system (Windows, macOS, Linux). If you use a package manager like brew (macOS) or apt (Ubuntu), the update may be available through those channels shortly after the official release. For Linux, you can also compile from source. After installation, verify the version with python --version (or python3 --version). Remember that this is an expedited release, so it may not appear in some third-party repositories immediately.

Where should I report bugs or issues related to Python 3.13.9?

All bug reports for Python should be submitted via the CPython issue tracker on GitHub. When filing a report, please include the exact Python version (3.13.9), the operating system, and a minimal reproducible example of the problem. The Python development team actively monitors these issues, and community members often provide helpful workarounds. For security-related issues, follow the responsible disclosure process outlined on the Python website.

Who is behind this release, and how can I support Python development?

This expedited release was prepared by the Python Release Team: Thomas Wouters, Ned Deily, Steve Dower, and Łukasz Langa. They thank all the volunteers who contribute to Python’s development. To support the Python Software Foundation (PSF), you can volunteer your time—whether by coding, writing documentation, or helping at events. Organizations can become sponsors, and individuals can donate through the PSF website. Your contribution helps maintain the language that powers millions of projects worldwide.