Only rely on _find_lineno on Python 3.10 and earlier.

This commit is contained in:
Jason R. Coombs 2024-06-06 10:58:04 -04:00
parent 043ff9abc6
commit 245b0a5def
No known key found for this signature in database
GPG Key ID: 708E6CB181B4C47E
1 changed files with 18 additions and 16 deletions

View File

@ -511,6 +511,8 @@ class DoctestModule(Module):
https://bugs.python.org/issue25532
"""
if sys.version_info < (3, 11):
def _find_lineno(self, obj, source_lines):
"""Doctest code does not take into account `@property`, this
is a hackish way to fix it. https://bugs.python.org/issue17446