diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-08-10 20:05:28 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-10 20:05:28 (GMT) |
| commit | 23b7a95f41674fa949e1b415f82e4b8858db47ae (patch) | |
| tree | 7d339c7d2670f57f9ee45c66bfd5d4cd4fb9c9cb /Python/pythonrun.c | |
| parent | a64c9488ac3864e570c07cbc1875601747f3b951 (diff) | |
| download | cpython-23b7a95f41674fa949e1b415f82e4b8858db47ae.zip cpython-23b7a95f41674fa949e1b415f82e4b8858db47ae.tar.gz cpython-23b7a95f41674fa949e1b415f82e4b8858db47ae.tar.bz2 | |
[3.13] gh-136914: Fix support of cached functions and properties in DocTest's lineno computation (GH-136930) (GH-137615)
Previously, DocTest's lineno of functions and methods decorated with
functools.cache(), functools.lru_cache() and functools.cached_property()
was not properly returned (None was returned) because the
computation relied on inspect.isfunction() which does not consider the
decorated result as a function.
We now use the more generic inspect.isroutine(), as elsewhere
in doctest's logic.
Also, added a special case for functools.cached_property().
(cherry picked from commit fece15d29f28e89f1231afa80508c80ed28dc37d)
Co-authored-by: Denis Laxalde <denis@laxalde.org>
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions
