Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-107995: Fix doctest collection of functools.cached_property objects #107996

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

tjsmart
Copy link
Contributor

@tjsmart tjsmart commented Aug 16, 2023

DocTestFinder would skip functools.cached_property objects because they were not considered to be a part of the module that it is collecting doc tests from. To fix this issue I added a check for cached_property that grabs the underlying function, similar to what is done for staticmethod and classmethod.

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Aug 16, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Lib/doctest.py Outdated Show resolved Hide resolved
@rhettinger rhettinger removed their request for review August 18, 2023 13:25
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! You can also add your name to this file here, if you like, but it isn't mandatory: https://github.com/python/cpython/blob/main/Misc/ACKS

@AlexWaygood
Copy link
Member

By the way, for future PRs to CPython, please avoid force-pushing where possible. It interacts badly with the GitHub UI, making it hard for reviewers to see what changed between commits. We merge everything using GitHub's "squash and merge" button in CPython, so we don't care about a messy commit history for a PR :-)

@tjsmart
Copy link
Contributor Author

tjsmart commented Aug 18, 2023

By the way, for future PRs to CPython, please avoid force-pushing where possible. It interacts badly with the GitHub UI, making it hard for reviewers to see what changed between commits. We merge everything using GitHub's "squash and merge" button in CPython, so we don't care about a messy commit history for a PR :-)

Sounds good. Thanks for the heads up! 👍

Copy link
Member

@carljm carljm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AlexWaygood AlexWaygood enabled auto-merge (squash) August 18, 2023 15:42
@AlexWaygood AlexWaygood merged commit 9bb576c into python:main Aug 18, 2023
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants