gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock by sileht · Pull Request #94050 · python/cpython · GitHub

github.com

GitHub CopilotWrite better code with AI | MCP RegistryIntegrate external tools | ActionsAutomate any workflow | CodespacesInstant dev environments | IssuesPlan and track work | Code ReviewManage code changes | Code QualityEnforce quality at merge | Why GitHub | Marketplace | View all features | Enterprises | Small and medium teams | Startups | View all use cases | View all industries | View all solutions | AI | Software Development | DevOps | Security | View all topics | Customer stories | Events & webinars | Ebooks & reports | Business insights | Trust center | Partners | View all resources

Tin mới

sileht:iscoroutinefix

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

inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances #84753

View reviewed changes

awaiting core review

awaiting core review

cpython/Lib/unittest/mock.py

Learn more about hiding disruptive comments

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

Make Blurb clearer

needs backport to 3.10

needs backport to 3.10

needs backport to 3.11

needs backport to 3.11

: Make inspect.iscoroutinefunction() work with AsyncMock (

: Make inspect.iscoroutinefunction() work with AsyncMock (

: Make inspect.iscoroutinefunction() work with AsyncMock (

: Make inspect.iscoroutinefunction() work with AsyncMock (

: Clarify change made to

gh-84753: Clarify change made to inspect functions #94554

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

iscoroutine returns False for native coroutines in python 3.5+ cython/cython#2092

asyncio.iscoroutinefunction returns false for Cython async function objects cython/cython#2273

Make Cython async functions set CO_COROUTINE and CO_ASYNC_GENERATOR code flags cython/cython#4902

gh-96127: Fix inspect.signature call on mocks #96335

Unpack partial in iscoroutinefunction holoviz/param#894

[BUG] Generators after being cythonized cannot be inspect as generators cython/cython#6096

Deprecate asyncio.iscoroutinefunction #122858

Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction open-telemetry/opentelemetry-python-contrib#3880