Skip to content

Replace deprecated asyncio.iscoroutinefunction with its counterpart… #10663

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

layday
Copy link
Contributor

@layday layday commented Apr 1, 2025

… from inspect (#10634)

(cherry picked from commit 77ad7d7)

What do these changes do?

Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction

asyncio.iscoroutinefunction was deprecated in python/cpython#122875.

Are there changes in behavior for the user?

No.

Is it a substantial burden for the maintainers to support this?

No.

Related issue number

None.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES/ folder
    • name it <issue_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

    • if you don't have an issue number, change it to the pull request
      number after creating the PR

      • .bugfix: A bug fix for something the maintainers deemed an
        improper undesired behavior that got corrected to match
        pre-agreed expectations.
      • .feature: A new behavior, public APIs. That sort of stuff.
      • .deprecation: A declaration of future API removals and breaking
        changes in behavior.
      • .breaking: When something public is removed in a breaking way.
        Could be deprecated in an earlier release.
      • .doc: Notable updates to the documentation structure or build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and tooling. Changes in the test invocation considerations and
        runtime assumptions.
      • .contrib: Stuff that affects the contributor experience. e.g.
        Running tests, building the docs, setting up the development
        environment.
      • .misc: Changes that are hard to assign to any of the above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      Use the past tense or the present tense a non-imperative mood,
      referring to what's changed compared to the last released version
      of this project.

@layday layday requested review from webknjaz and asvetlov as code owners April 1, 2025 08:39
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Apr 1, 2025
@layday layday force-pushed the patchback/backports/3.11/77ad7d7ea173eda1306297d275b2d5f7348f9f60/pr-10634 branch from f0f765c to 918fb70 Compare April 1, 2025 08:43
Copy link

codspeed-hq bot commented Apr 1, 2025

CodSpeed Performance Report

Merging #10663 will not alter performance

Comparing layday:patchback/backports/3.11/77ad7d7ea173eda1306297d275b2d5f7348f9f60/pr-10634 (0658ba3) with 3.11 (2082fba)

Summary

✅ 51 untouched benchmarks

@Dreamsorcerer
Copy link
Member

Hmm, tests failed on 3.11, but were fine on 3.12. Unless someone wants to investigate, can probably just drop the 3.11 backport. 3.11 probably won't last too much longer.

@layday layday closed this Apr 1, 2025
@layday layday reopened this Apr 1, 2025
@layday layday force-pushed the patchback/backports/3.11/77ad7d7ea173eda1306297d275b2d5f7348f9f60/pr-10634 branch from 918fb70 to 4f999f2 Compare April 1, 2025 11:48
@layday
Copy link
Contributor Author

layday commented Apr 1, 2025

PEBKAC (I copied the wrong variable name when resolving the conflict)

@layday layday force-pushed the patchback/backports/3.11/77ad7d7ea173eda1306297d275b2d5f7348f9f60/pr-10634 branch from e72bcad to 0658ba3 Compare April 1, 2025 11:49
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.09%. Comparing base (2082fba) to head (0658ba3).
Report is 43 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11   #10663   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files         126      126           
  Lines       37554    37555    +1     
  Branches     4536     4536           
=======================================
+ Hits        36840    36841    +1     
  Misses        538      538           
  Partials      176      176           
Flag Coverage Δ
CI-GHA 97.98% <100.00%> (+<0.01%) ⬆️
OS-Linux 97.68% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.74% <85.71%> (-0.01%) ⬇️
OS-macOS 96.81% <100.00%> (+0.16%) ⬆️
Py-3.10.11 96.67% <100.00%> (+2.37%) ⬆️
Py-3.10.16 97.25% <100.00%> (+0.04%) ⬆️
Py-3.11.11 97.27% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 96.74% <100.00%> (+<0.01%) ⬆️
Py-3.12.9 97.76% <100.00%> (+<0.01%) ⬆️
Py-3.13.2 97.74% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 96.57% <85.71%> (+2.35%) ⬆️
Py-3.9.21 97.13% <85.71%> (+0.02%) ⬆️
Py-pypy7.3.16 96.71% <85.71%> (-0.01%) ⬇️
VM-macos 96.81% <100.00%> (+0.16%) ⬆️
VM-ubuntu 97.68% <100.00%> (+<0.01%) ⬆️
VM-windows 94.74% <85.71%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Dreamsorcerer Dreamsorcerer merged commit b65000d into aio-libs:3.11 Apr 1, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants