[3.12] gh-117692: Fix `AttributeError` in `DocTestFinder` on wrapped `builtin_or_method` (GH-117699) by miss-islington · Pull Request #117708 · python/cpython

@miss-islington

…builtin_or_method` (pythonGH-117699)

(cherry picked from commit 4bb7d12)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

This was referenced

Apr 10, 2024

@AlexWaygood

Hmm, looks like the @doctest_skip_if decorator doesn't exist on Python 3.12

@AlexWaygood

Hmm, looks like the @doctest_skip_if decorator doesn't exist on Python 3.12

@sobolevn, reckon we should just backport the doctest_skip_if decorator to 3.12 as part of this PR? It seems pretty simple and low-risk

@sobolevn

See #116758 (comment)
I also thought that skipping this doctest would be easier, but the oirignal PR author had a valid point about doctest internals change in 3.13. We can go with if ...: in this branch.

@sobolevn

@AlexWaygood