You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MockAwareDocTestFinder._find_lineno is stale #12430
"""Doctest code does not take into account `@property`, this
is a hackish way to fix it. https://bugs.python.org/issue17446
Wrapped Doctests will need to be unwrapped so the correct
line number is returned. This will be reported upstream. #8796
"""
issue17446 resolves to python/cpython#61648, the fix which was released in Python 3.11. #8796 links to 0191563, which indicates that the method has two purposes, one to work around the aforementioned cpython issue and another "to be reported upstream," though I don't see that it was reported upstream. Does it still need to be reported upstream?
Doing a bit of testing, the doctests all pass on Python 3.11 and later with that method removed, so I'm inclined to say there's no outstanding work to be done except to suppress the use of this workaround after Python 3.11.
Yes, I agree. I did not trace the origin more deeply than to look at minor versions. I think you're right and the workaround should be enabled for the specified patch versions or made dependent on Python 3.13.
Activity
Cleanup MockAwareDocTestFinder. (#12431)
The-Compiler commentedon Jun 17, 2024
At the sprint, we just ran into the selftests failing for @webknjaz, and it was because he happened to be running the testsuite with Python 3.11.8.
You said:
but the fix actually only made it into Python 3.11.9 and 3.12.3, which are only around 2 months old now.
@jaraco I suppose it'd make sense to still use the workaround on 3.11 and 3.12 versions before those patch releases, no?
jaraco commentedon Jun 18, 2024
Yes, I agree. I did not trace the origin more deeply than to look at minor versions. I think you're right and the workaround should be enabled for the specified patch versions or made dependent on Python 3.13.
🚑 Clarify patch condition for doctest finder hack
webknjaz commentedon Jun 18, 2024
Regression fix: #12471
webknjaz commentedon Jun 18, 2024
@The-Compiler could you assign me here?
🚑 Clarify patch condition for doctest finder hack
🚑 Clarify patch condition for doctest finder hack (pytest-dev#12471)
🚑 Clarify patch condition for doctest finder hack (pytest-dev#12471)