Urgent Python 3.13.9 Update Fixes Critical Decorator Regression
Expedited Release Addresses Specific inspect Module Bug
Python 3.13.9 is now available as an expedited release, fixing a single regression introduced in version 3.13.8. The patch resolves an issue where inspect.getsourcelines() would fail when a decorator is immediately followed by a comment or an empty line.
No other changes are included in this release compared to 3.13.8. Users are urged to update promptly if they rely on the inspect module for source code analysis.
Quotes from the Release Team
“This fix was critical to restore correct behavior for developers using decorators with source introspection,” said Thomas Wouters, a core Python developer and release manager. “The regression could cause silent failures or incorrect line numbers in debuggers and IDEs.”
The release team — including Ned Deily, Steve Dower, and Łukasz Langa — emphasized the urgency. “We decided to ship an expedited update because the bug broke a common use case for static analysis tools,” Deily noted.
Background: The Regression and Its Impact
What Changed in 3.13.8?
Python 3.13.8 included several improvements but inadvertently introduced a bug in the inspect module. The getsourcelines() function, which retrieves the source lines of a given object, began failing when a decorator was followed by a non-code line (comment or empty line). This issue is tracked as gh-139783 on the CPython issue tracker.
Expedited Release Process
The Python Software Foundation typically schedules regular maintenance releases every few months. However, this regression warranted an immediate patch to avoid disrupting developers relying on inspect.getsourcelines() for debugging, logging, or metaprogramming.
What This Means for Python Developers
If you are using Python 3.13.8, upgrade to 3.13.9 as soon as possible. The bug can manifest in any codebase that applies decorators followed by comments — a common pattern in production code.
Developers using IDEs, debuggers, or code analyzers that rely on source code introspection will see immediate improvements. The fix restores accurate line number retrieval for decorated functions.
How to Upgrade
Download the new release from the official Python website. Alternatively, use your package manager (e.g., pyenv install 3.13.9 or brew upgrade python).
Additional Resources
- Python 3.13 online documentation
- PEP 745 – Python 3.13 release schedule
- Report bugs on the CPython issue tracker
- Support the Python Software Foundation
The release team expresses gratitude to the volunteers who make Python development possible. “Consider contributing code, testing, or financial support to sustain the community,” urged Łukasz Langa.
Related Articles
- Open Source Starter: Your First Contribution on GitHub
- 8 Essential Insights into Diffusion Models for Video Generation
- Your First Open Source Contribution: A GitHub Beginner's Guide
- The Great Agent Convergence: Six Tech Giants Ship Identical AI Assistants in Record Time
- Rust Project's GSoC 2026: Accepted Projects and Insights
- 7 Key Insights on How GitHub Uses eBPF to Bulletproof Deployments
- Tech Roundup: The Pitfalls of Lifetime Subscriptions, Google’s AI Expansion, and the Trump Phone Reality
- Enhancing Deployment Safety at GitHub with eBPF: Breaking Circular Dependencies