Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-122858: Deprecateasyncio.iscoroutinefunction#122875

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kumaraditya303 merged 16 commits intopython:mainfromWulian233:asyncio
Aug 11, 2024

Conversation

Wulian233
Copy link
Contributor

@Wulian233Wulian233 commentedAug 10, 2024
edited
Loading

Sameinspect.iscoroutinefunction, we don't need two different functions to do the same thing.

@Wulian233Wulian233 marked this pull request as draftAugust 10, 2024 02:52
@Wulian233
Copy link
ContributorAuthor

Wulian233 commentedAug 10, 2024
edited
Loading

After my many fix, maybe it is normal for the Docs workflow to fail because the deprecated functionasyncio.iscoroutinefunctiondoes not have a corresponding document page introduction

But I don't know how to solve this problem. Delete whatnew/3.14.rst:func: iscoroutinefunctiondoes?

(Solved)

@Wulian233Wulian233 marked this pull request as ready for reviewAugust 10, 2024 04:15
@cjw296cjw296 removed their request for reviewAugust 10, 2024 09:31
Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

Please, use at least one test that ensures that the function is deprecated (which does not ignore the warnings).

@Wulian233
Copy link
ContributorAuthor

Wulian233 commentedAug 11, 2024
edited
Loading

This is the function that test this functionc1f2743 If not have@ignore_warnings(category=DeprecationWarning) this will cause the workflow test to fail (DeprecationWarning). Do you mean to add some kind of tip below, without causing failure?

@ignore_warnings(category=DeprecationWarning)deftest_iscoroutinefunction(self):print("asyncio.iscoroutinefunction is deprecated, use inspect.iscoroutinefunction() instead")deffn():       ...

(Sorry, I may not be familiar with it)

@kumaraditya303
Copy link
Contributor

I am taking over this now.

@kumaraditya303kumaraditya303enabled auto-merge (squash)August 11, 2024 16:15
@kumaraditya303kumaraditya303 merged commitbc9d92c intopython:mainAug 11, 2024
36 checks passed
@Wulian233Wulian233 deleted the asyncio branchAugust 11, 2024 23:16
blhsing pushed a commit to blhsing/cpython that referenced this pull requestAug 22, 2024
Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`.Co-authored-by: Kumar Aditya <kumaraditya@python.org>
AdamWill pushed a commit to AdamWill/cached-property that referenced this pull requestNov 5, 2024
Python 3.14 will deprecate asyncio.iscoroutinefunction:python/cpython#122875inspect.iscoroutinefunction exists since 3.5 and our baselineis 3.8, so we can just use it unconditionally.Using a wrapper with @asyncio.coroutine in __get__ wasn'tnecessary (the future from asyncio.ensure_future is awaitable,and the wrapper doesn't do anything asynchronous), so thelogic can be simplified to just call asyncio.ensure_future(to schedule the task and store the result when it'savailable).
layday added a commit to layday/aiohttp that referenced this pull requestMar 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sobolevnsobolevnsobolevn left review comments

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Wulian233@kumaraditya303@sobolevn

[8]ページ先頭

©2009-2025 Movatter.jp