René's URL Explorer Experiment


Title: gh-131116: Fix inspect._finddoc to work with cached_property objects. by lincolnj1 · Pull Request #131165 · python/cpython · GitHub

Open Graph Title: gh-131116: Fix inspect._finddoc to work with cached_property objects. by lincolnj1 · Pull Request #131165 · python/cpython

X Title: gh-131116: Fix inspect._finddoc to work with cached_property objects. by lincolnj1 · Pull Request #131165 · python/cpython

Description: Calling inspect.getdoc on a cached_property that inherits a docstring and does not define one would return None rather than the inherited docstring. This is because inspect._finddoc would treat the cached_property obj as a methoddescriptor and encounter an AttributeError trying to access obj.__name__. This PR adds a special case for cached_properties in _finddoc so that it can find the inherited docstring. Issue: gh-131116

Open Graph Description: Calling inspect.getdoc on a cached_property that inherits a docstring and does not define one would return None rather than the inherited docstring. This is because inspect._finddoc would treat the...

X Description: Calling inspect.getdoc on a cached_property that inherits a docstring and does not define one would return None rather than the inherited docstring. This is because inspect._finddoc would treat the...

Opengraph URL: https://github.com/python/cpython/pull/131165

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:dfb2e010-54f5-0a2b-f944-12f7848cf354
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9408:3BA6B9:4E9B58:68FB12:6AED1851
html-safe-nonce36de638f8c9cff50755e22f6fe3b165ae66d6198626fb677ea7835bd85c50afd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDA4OjNCQTZCOTo0RTlCNTg6NjhGQjEyOjZBRUQxODUxIiwidmlzaXRvcl9pZCI6Ijc4MTMxNzI1Mzk3ODg0MzM0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac22285b5a4085f27c85bef828f7cb059b94cb205952df6ca08b6a388deed110a2
hovercard-subject-tagpull_request:2388973508
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/131165/files
twitter:imagehttps://avatars.githubusercontent.com/u/99031153?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/99031153?s=400&v=4
og:image:altCalling inspect.getdoc on a cached_property that inherits a docstring and does not define one would return None rather than the inherited docstring. This is because inspect._finddoc would treat the...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None120085d0bcec1f427e3ab45302c8b95f873d26ad21984dc86d62ab2c10158f41
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee12fd03aa775dceadc5a793c3a0791e43ca256bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/131165/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F131165%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F131165%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/131165/files
Reloadhttps://github.com/python/cpython/pull/131165/files
Reloadhttps://github.com/python/cpython/pull/131165/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.3k (2.3k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
lincolnj1:getdoc-fixhttps://github.com/lincolnj1/cpython/tree/getdoc-fix
Conversation 34 https://github.com/python/cpython/pull/131165
Commits 19 https://github.com/python/cpython/pull/131165/commits
Checks 44 https://github.com/python/cpython/pull/131165/checks
Files changed https://github.com/python/cpython/pull/131165/files
Please reload this pagehttps://github.com/python/cpython/pull/131165/files
gh-131116: Fix inspect._finddoc to work with cached_property objects. https://github.com/python/cpython/pull/131165/files#top
Show all changes 19 commits https://github.com/python/cpython/pull/131165/files
19d5c42 attempted fix of issue #131116. Test case failing on non changed parts lincolnj1 Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/19d5c42b09a57c5d93ee9cd391ab21b8ea55ba90
02ec2c1 Moved new test fodder to seperate file to fix errors lincolnj1 Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/02ec2c1ca9a704e040dd3127d5325a4357effa27
8786c3c Cleaned workspace and actually added the changed files this time lincolnj1 Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/8786c3c29a62aa3d8a68820f7239c5dc4a7f9257
9fe818c Merge branch 'python:main' into getdoc-fix lincolnj1 Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/9fe818cc70139e4ed6815607724a13c72cb18b03
5772f7b Seperated new tests into new test case lincolnj1 Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/5772f7b2aa9326c0ae34f3d4cd9d6f7574eb4c6c
f68119e Merge branch 'getdoc-fix' of github.com:lincolnj1/cpython into getdoc… lincolnj1 Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/f68119eac84a055e14187ecb95c4dfbcfdefcf55
2406055 📜🤖 Added by blurb_it. blurb-it[bot] Mar 12, 2025 https://github.com/python/cpython/pull/131165/commits/24060559fe45770fee040917438c1e86d04c8f69
5f0d6d4 Merge branch 'python:main' into getdoc-fix lincolnj1 Mar 13, 2025 https://github.com/python/cpython/pull/131165/commits/5f0d6d4a10f5a725932b0caf00f93110f130490e
d61ab34 Added more tests and versionchanged to Doc lincolnj1 Mar 31, 2025 https://github.com/python/cpython/pull/131165/commits/d61ab34248a43482b204c3e6ca4e102df3a3c50d
4b74d4e Update Doc/library/inspect.rst lincolnj1 Apr 1, 2025 https://github.com/python/cpython/pull/131165/commits/4b74d4e38cf64e85c2d66be4d55bdf2da6390e23
cfe3e99 Update Lib/test/test_inspect/inspect_fodder3.py lincolnj1 Apr 1, 2025 https://github.com/python/cpython/pull/131165/commits/cfe3e99d76897a92ca67d2ad65021611c4ea30b5
fa92ad3 Update Lib/test/test_inspect/inspect_fodder3.py lincolnj1 Apr 1, 2025 https://github.com/python/cpython/pull/131165/commits/fa92ad3d7c160f6a6a87cba97e91727aafe0afc1
d83205c Update Lib/test/test_inspect/inspect_fodder3.py lincolnj1 Apr 1, 2025 https://github.com/python/cpython/pull/131165/commits/d83205ceb41f106c6e13a9e1aee686bd39e57124
c4764ff Update Lib/test/test_inspect/inspect_fodder3.py lincolnj1 Apr 1, 2025 https://github.com/python/cpython/pull/131165/commits/c4764fffb8cd345772d0573bea15514149074275
1b0471f Fixed inspect_fodder3 comments and added new test cases lincolnj1 Apr 10, 2025 https://github.com/python/cpython/pull/131165/commits/1b0471fe6c526474a802f085b2e49293669a3c23
d4e37c3 Merge branch 'main' into getdoc-fix serhiy-storchaka Nov 12, 2025 https://github.com/python/cpython/pull/131165/commits/d4e37c3c68d614291b0355a994033fa7070600bc
1e0cb4b Apply suggestions from code review serhiy-storchaka Nov 12, 2025 https://github.com/python/cpython/pull/131165/commits/1e0cb4b90a4c699dbc5e244fde6a2a5fc821a670
a669d23 Update Lib/test/test_inspect/test_inspect.py serhiy-storchaka Nov 12, 2025 https://github.com/python/cpython/pull/131165/commits/a669d2386278379d69462b816fb44f735d82c46a
c510524 Apply suggestions from code review serhiy-storchaka Nov 12, 2025 https://github.com/python/cpython/pull/131165/commits/c51052411479f2bd877f22c79e1bace417702041
Clear filters https://github.com/python/cpython/pull/131165/files
Please reload this pagehttps://github.com/python/cpython/pull/131165/files
Please reload this pagehttps://github.com/python/cpython/pull/131165/files
inspect.rst https://github.com/python/cpython/pull/131165/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
inspect.py https://github.com/python/cpython/pull/131165/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
inspect_fodder3.py https://github.com/python/cpython/pull/131165/files#diff-f6e02d92a4d1974fdf5f2e7bd3adb32ad8ca217df81311e8f05e6758af3f8bec
test_inspect.py https://github.com/python/cpython/pull/131165/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
2025-03-12-18-57-10.gh-issue-131116.uTpwXZ.rst https://github.com/python/cpython/pull/131165/files#diff-b2c12c63014f07caa445a332617cf9b53da6c6157e0603c7f7fda8c406ff7e6d
Doc/library/inspect.rsthttps://github.com/python/cpython/pull/131165/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
View file https://github.com/lincolnj1/cpython/blob/c51052411479f2bd877f22c79e1bace417702041/Doc/library/inspect.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/131165/{{ revealButtonHref }}
https://github.com/python/cpython/pull/131165/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
https://github.com/python/cpython/pull/131165/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
Lib/inspect.pyhttps://github.com/python/cpython/pull/131165/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
View file https://github.com/lincolnj1/cpython/blob/c51052411479f2bd877f22c79e1bace417702041/Lib/inspect.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/131165/{{ revealButtonHref }}
https://github.com/python/cpython/pull/131165/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
https://github.com/python/cpython/pull/131165/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
Lib/test/test_inspect/inspect_fodder3.pyhttps://github.com/python/cpython/pull/131165/files#diff-f6e02d92a4d1974fdf5f2e7bd3adb32ad8ca217df81311e8f05e6758af3f8bec
View file https://github.com/lincolnj1/cpython/blob/c51052411479f2bd877f22c79e1bace417702041/Lib/test/test_inspect/inspect_fodder3.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/131165/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/131165/files
Lib/test/test_inspect/test_inspect.pyhttps://github.com/python/cpython/pull/131165/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
View file https://github.com/lincolnj1/cpython/blob/c51052411479f2bd877f22c79e1bace417702041/Lib/test/test_inspect/test_inspect.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/131165/{{ revealButtonHref }}
https://github.com/python/cpython/pull/131165/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/131165/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/131165/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/131165/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
Misc/NEWS.d/next/Library/2025-03-12-18-57-10.gh-issue-131116.uTpwXZ.rsthttps://github.com/python/cpython/pull/131165/files#diff-b2c12c63014f07caa445a332617cf9b53da6c6157e0603c7f7fda8c406ff7e6d
View file https://github.com/lincolnj1/cpython/blob/c51052411479f2bd877f22c79e1bace417702041/Misc/NEWS.d/next/Library/2025-03-12-18-57-10.gh-issue-131116.uTpwXZ.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/131165/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/131165/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.