René's URL Explorer Experiment


Title: gh-94912: Added marker for non-standard coroutine function detection by carltongibson · Pull Request #99247 · python/cpython · GitHub

Open Graph Title: gh-94912: Added marker for non-standard coroutine function detection by carltongibson · Pull Request #99247 · python/cpython

X Title: gh-94912: Added marker for non-standard coroutine function detection by carltongibson · Pull Request #99247 · python/cpython

Description: This is ref the discussion on #94912 to add an official way of marking callables as coroutine functions where they would not otherwise be detected. cc. @gvanrossum @andrewgodwin I've just had time this afternoon to block off some first tests, and docs. I wanted to break ground so we keep it moving. It's very consciously drafts: please make suggestions of how you think it should go. @gvanrossum Can I ask for a pointer on how I'm meant to set co_flags for the _has_code_flag() check? 🤔 cpython/Lib/inspect.py Lines 376 to 385 in c43714f def _has_code_flag(f, flag): """Return true if ``f`` is a function (or a method or functools.partial wrapper wrapping a function) whose code object has the given ``flag`` set in its flags.""" while ismethod(f): f = f.__func__ f = functools._unwrap_partial(f) if not (isfunction(f) or _signature_is_functionlike(f)): return False return bool(f.__code__.co_flags & flag) Thanks! First PR on CPython, so likely it's wrong 😊 Clone and Build as per https://devguide.python.org. Run new just tests with % ./python.exe -m unittest test.test_inspect.TestPredicates Do we need to create a new ticket, or is #94912 OK? Issue: gh-94912

Open Graph Description: This is ref the discussion on #94912 to add an official way of marking callables as coroutine functions where they would not otherwise be detected. cc. @gvanrossum @andrewgodwin I've just had t...

X Description: This is ref the discussion on #94912 to add an official way of marking callables as coroutine functions where they would not otherwise be detected. cc. @gvanrossum @andrewgodwin I've just h...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:15881307-17a3-9083-001e-fbc364a486b5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEDC6:1A9729:14B35AC:1D5367F:696902CF
html-safe-noncea66e95d476a41eedacf754b1f4bf09c8eb5fb46976ea68d068dd6bf0d1286f53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREM2OjFBOTcyOToxNEIzNUFDOjFENTM2N0Y6Njk2OTAyQ0YiLCJ2aXNpdG9yX2lkIjoiNDk1MjA5NDY3ODQyMTQwNjQxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacae7b4854b91fdfb4d3896cbb36c01bcf42e6f116d3fd2c06a83bc2cda6735b4c
hovercard-subject-tagpull_request:1114489506
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/99247/files
twitter:imagehttps://avatars.githubusercontent.com/u/64686?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/64686?s=400&v=4
og:image:altThis is ref the discussion on #94912 to add an official way of marking callables as coroutine functions where they would not otherwise be detected. cc. @gvanrossum @andrewgodwin I've just had t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee6156bd4ef9f2dc8dadf4c49a8f7ed8532186388cef72eda3ccb9f0ab3b8cfca
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
releasefd1938215b152e2c6a29cf56fec07fd9f91f1203
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/99247/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F99247%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F99247%2Ffiles
Sign up https://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/99247/files
Reloadhttps://github.com/python/cpython/pull/99247/files
Reloadhttps://github.com/python/cpython/pull/99247/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/99247/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/99247/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://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
gvanrossumhttps://github.com/gvanrossum
python:mainhttps://github.com/python/cpython/tree/main
carltongibson:fix-issue-XXXXXhttps://github.com/carltongibson/cpython/tree/fix-issue-XXXXX
Conversation 55 https://github.com/python/cpython/pull/99247
Commits 16 https://github.com/python/cpython/pull/99247/commits
Checks 0 https://github.com/python/cpython/pull/99247/checks
Files changed https://github.com/python/cpython/pull/99247/files
Please reload this pagehttps://github.com/python/cpython/pull/99247/files
gh-94912: Added marker for non-standard coroutine function detection https://github.com/python/cpython/pull/99247/files#top
Show all changes 16 commits https://github.com/python/cpython/pull/99247/files
4cf8e98 Added initial test and docs drafts. carltongibson Nov 8, 2022 https://github.com/python/cpython/pull/99247/commits/4cf8e98175e501c671c3c43016d3df443def9ffc
6b8fa87 Make first case pass setting code flags. carltongibson Nov 15, 2022 https://github.com/python/cpython/pull/99247/commits/6b8fa872c5378cc608b0a0ca01ed350c4193e07d
fa22a16 Adjust iscoroutinefunction() to look for async __call__. carltongibson Nov 15, 2022 https://github.com/python/cpython/pull/99247/commits/fa22a1631ebaf49f54d45eb36057ac3a49ca26f6
513d358 📜🤖 Added by blurb_it. blurb-it[bot] Nov 17, 2022 https://github.com/python/cpython/pull/99247/commits/513d3582081efe0d83bd5d4da1f4d9a8c99e3535
397a975 Moved to decorator; extra tests. carltongibson Nov 17, 2022 https://github.com/python/cpython/pull/99247/commits/397a975bc331733aafdc843611180759e135f012
d156eab Added tests for lambda, @classmethod, and @staticmethod cases. carltongibson Nov 23, 2022 https://github.com/python/cpython/pull/99247/commits/d156eab1859aaade6b3e096a25caefdc93731ede
34859de Adjusted docs signature for review comment. carltongibson Nov 23, 2022 https://github.com/python/cpython/pull/99247/commits/34859de64ada345fca4a5741825180297bc35438
47a9fea Improve grammar in NEWS file gvanrossum Nov 23, 2022 https://github.com/python/cpython/pull/99247/commits/47a9fea9653ca539c02e62649bebe8300ad260e9
cd6c491 Adjusted docs. carltongibson Nov 29, 2022 https://github.com/python/cpython/pull/99247/commits/cd6c491359b2424d3ff6b2bac6b8efc12c62ffc0
629dd81 Updated for review comments. carltongibson Nov 30, 2022 https://github.com/python/cpython/pull/99247/commits/629dd8192dc2f5559286028e98f29d58f8cbbf1f
a518c0f Merge branch 'main' into fix-issue-XXXXX gvanrossum Nov 30, 2022 https://github.com/python/cpython/pull/99247/commits/a518c0f0b98d673b7d84b34526f6648ff81f9bf9
c6d2b88 Use marker for implementation. carltongibson Dec 6, 2022 https://github.com/python/cpython/pull/99247/commits/c6d2b88a1884039c8ea98124401acbf10accf660
b7249a8 Added "What's New..." entry. carltongibson Dec 6, 2022 https://github.com/python/cpython/pull/99247/commits/b7249a89b25ab6f5643208f6b8dcd00dd3507593
3bc72e2 Adjusted implementation. carltongibson Dec 8, 2022 https://github.com/python/cpython/pull/99247/commits/3bc72e2422ba4f44725525c5eb87989c677c6b34
c073cf7 Renamed to _is_coroutine_marker. carltongibson Dec 13, 2022 https://github.com/python/cpython/pull/99247/commits/c073cf79867a702dc4de6a0659dd9d16bfe4b44e
5ffba32 Adjusted implementation and docs. carltongibson Dec 13, 2022 https://github.com/python/cpython/pull/99247/commits/5ffba320051f474cad2796621bc648e0e66890dc
Clear filters https://github.com/python/cpython/pull/99247/files
Please reload this pagehttps://github.com/python/cpython/pull/99247/files
Please reload this pagehttps://github.com/python/cpython/pull/99247/files
inspect.rst https://github.com/python/cpython/pull/99247/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
3.12.rst https://github.com/python/cpython/pull/99247/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
inspect.py https://github.com/python/cpython/pull/99247/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
test_inspect.py https://github.com/python/cpython/pull/99247/files#diff-cd0b5ed704ccdad2d507d4f756ac2a9b391e0c9bbb5554baf851dbebd8b5e618
2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rst https://github.com/python/cpython/pull/99247/files#diff-63ed2255d0e070054c79d623b14c3db38cff7e09d54173806b15a47a7240c4a5
Doc/library/inspect.rsthttps://github.com/python/cpython/pull/99247/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
View file https://github.com/carltongibson/cpython/blob/5ffba320051f474cad2796621bc648e0e66890dc/Doc/library/inspect.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99247/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99247/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
https://github.com/python/cpython/pull/99247/files#diff-28534bf091e28ca43bf9d54227179e5bb8297a038072241978f9b4f954427ae3
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/whatsnew/3.12.rsthttps://github.com/python/cpython/pull/99247/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
View file https://github.com/carltongibson/cpython/blob/5ffba320051f474cad2796621bc648e0e66890dc/Doc/whatsnew/3.12.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99247/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99247/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/99247/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
Lib/inspect.pyhttps://github.com/python/cpython/pull/99247/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
View file https://github.com/carltongibson/cpython/blob/5ffba320051f474cad2796621bc648e0e66890dc/Lib/inspect.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99247/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99247/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
https://github.com/python/cpython/pull/99247/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
https://github.com/python/cpython/pull/99247/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
https://github.com/python/cpython/pull/99247/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
Lib/test/test_inspect.pyhttps://github.com/python/cpython/pull/99247/files#diff-cd0b5ed704ccdad2d507d4f756ac2a9b391e0c9bbb5554baf851dbebd8b5e618
View file https://github.com/carltongibson/cpython/blob/5ffba320051f474cad2796621bc648e0e66890dc/Lib/test/test_inspect.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99247/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99247/files#diff-cd0b5ed704ccdad2d507d4f756ac2a9b391e0c9bbb5554baf851dbebd8b5e618
Please reload this pagehttps://github.com/python/cpython/pull/99247/files
https://github.com/python/cpython/pull/99247/files#diff-cd0b5ed704ccdad2d507d4f756ac2a9b391e0c9bbb5554baf851dbebd8b5e618
Misc/NEWS.d/next/Library/2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rsthttps://github.com/python/cpython/pull/99247/files#diff-63ed2255d0e070054c79d623b14c3db38cff7e09d54173806b15a47a7240c4a5
View file https://github.com/carltongibson/cpython/blob/5ffba320051f474cad2796621bc648e0e66890dc/Misc/NEWS.d/next/Library/2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99247/{{ revealButtonHref }}
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.