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

github.com

Tin mới

carltongibson:fix-issue-XXXXX

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

cpython/Lib/inspect.py

make asyncio.iscoroutinefunction a deprecated alias of inspect.iscoroutinefunction and remove asyncio.coroutines._is_coroutine #94912

View reviewed changes

Learn more about hiding disruptive comments

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

Added initial test and docs drafts.

Make first case pass setting code flags.

Adjust iscoroutinefunction() to look for async __call__.

📜🤖 Added by blurb_it.

Moved to decorator; extra tests.

View reviewed changes

Added tests for lambda,

Adjusted docs signature for review comment.

View reviewed changes

[DRAFT] Initial sketch of iscoroutinefunction shim for PY312

here's where they use it

Good point on the docs. Whichever way we go, a small tweak there. 👀

Improve grammar in NEWS file

netlify Bot commented Dec 8, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.
netlify Bot commented Dec 8, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.

netlify Bot commented Dec 8, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

Renamed to _is_coroutine_marker.

Adjusted implementation and docs.

Initial sketch of iscoroutinefunction shim for PY312

Added coroutine detection shims for Python 3.12 django/asgiref#360

Refs #34118 -- Adopted asgiref coroutine detection shims. django/django#16380

Initial sketch of iscoroutinefunction shim for PY312

View reviewed changes

awaiting change review

Merge branch 'main' into fastmock

iscoroutinefunction returns False for wrapper functions with update_wrapper applied #100317

Merged main into regmachine branch (

gh-94912: Adjusted check for non-standard coroutine function marker. #100935

asyncio.iscoroutinefunction(<async_generator>.asend) returns False #81371