Putty Ssh
📖 Tutorial

Urgent Python 3.13.9 Update Fixes Critical Decorator Regression

Last updated: 2026-05-01 08:47:02 Intermediate
Complete guide
Follow along with this comprehensive guide

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.

Urgent Python 3.13.9 Update Fixes Critical Decorator Regression

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

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.