Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-123087: Lib/test/test_unittest/testmock/testasync.py: Replace usage of the deprecated asyncio.iscoroutinefunction with the inspect.iscoroutinefunction #123088

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

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Aug 17, 2024

@Eclips4 Eclips4 requested a review from kumaraditya303 August 17, 2024 04:24
@Eclips4 Eclips4 requested a review from cjw296 as a code owner August 17, 2024 04:24
@Eclips4 Eclips4 changed the title Lib/test/test_unittest/testmock/testasync.py: Replace usage of the deprecated asyncio.iscoroutinefunction with the inspect.iscoroutinefunction gh-123087: Lib/test/test_unittest/testmock/testasync.py: Replace usage of the deprecated asyncio.iscoroutinefunction with the inspect.iscoroutinefunction Aug 17, 2024
@Eclips4 Eclips4 added skip news tests Tests in the Lib/test dir labels Aug 17, 2024
@sobolevn
Copy link
Member

With this PR applied:

» ./python.exe -m test test_unittest
Using random seed: 378421234
0:00:00 load avg: 1.49 Run 1 test sequentially in a single process
0:00:00 load avg: 1.49 [1/1] test_unittest

== Tests result: SUCCESS ==

1 test OK.

Total duration: 3.9 sec
Total tests: run=1,061 skipped=2
Total test files: run=1/1
Result: SUCCESS

Thank you!

@sobolevn sobolevn merged commit e6d5ff5 into python:main Aug 17, 2024
37 checks passed
@sobolevn
Copy link
Member

Backports are not needed, since this is only for 3.14+ with new deprecation

@Eclips4 Eclips4 deleted the issue-123087 branch August 17, 2024 08:04
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot iOS ARM64 Simulator 3.x has failed when building commit e6d5ff5.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1380/builds/1090) and take a look at the build logs.
  4. Check if the failure is related to this commit (e6d5ff5) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1380/builds/1090

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 7, done.        
remote: Counting objects:  14% (1/7)        
remote: Counting objects:  28% (2/7)        
remote: Counting objects:  42% (3/7)        
remote: Counting objects:  57% (4/7)        
remote: Counting objects:  71% (5/7)        
remote: Counting objects:  85% (6/7)        
remote: Counting objects: 100% (7/7)        
remote: Counting objects: 100% (7/7), done.        
remote: Total 7 (delta 6), reused 6 (delta 6), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to 'e6d5ff55d0816d7f5eb45e49c810e936b09d2be7'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at e6d5ff55d0 gh-123087: ``Lib/test/test_unittest/testmock/testasync.py``: Replace usage of the deprecated ``asyncio.iscoroutinefunction`` with the ``inspect.iscoroutinefunction`` (#123088)
Switched to and reset branch 'main'

configure: WARNING: -Wtrampolines not supported
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

In file included from ../../Python/ceval.c:834:
../../Python/generated_cases.c.h:764:31: warning: code will never be executed [-Wunreachable-code]
                for (int _i = oparg; --_i >= 0;) {
                              ^~~~~
../../Python/generated_cases.c.h:656:31: warning: code will never be executed [-Wunreachable-code]
                for (int _i = oparg*2; --_i >= 0;) {
                              ^~~~~
2 warnings generated.
../../Modules/blake2module.c:314:18: warning: unused variable 'st' [-Wunused-variable]
    Blake2State* st = blake2_get_state_from_type(type);
                 ^
../../Modules/blake2module.c:107:20: warning: unused function 'has_simd128' [-Wunused-function]
static inline bool has_simd128(cpu_flags *flags) {
                   ^
../../Modules/blake2module.c:113:20: warning: unused function 'has_simd256' [-Wunused-function]
static inline bool has_simd256(cpu_flags *flags) {
                   ^
3 warnings generated.

configure: WARNING: -Wtrampolines not supported
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

../../Modules/blake2module.c:314:18: warning: unused variable 'st' [-Wunused-variable]
    Blake2State* st = blake2_get_state_from_type(type);
                 ^
../../Modules/blake2module.c:107:20: warning: unused function 'has_simd128' [-Wunused-function]
static inline bool has_simd128(cpu_flags *flags) {
                   ^
../../Modules/blake2module.c:113:20: warning: unused function 'has_simd256' [-Wunused-function]
static inline bool has_simd256(cpu_flags *flags) {
                   ^
3 warnings generated.

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:C6AEA11C-C34A-47B8-BD67-AF0403ECA353, OS:17.5, name:iPhone SE (3rd generation) }
{ platform:iOS Simulator, id:C6AEA11C-C34A-47B8-BD67-AF0403ECA353, OS:17.5, name:iPhone SE (3rd generation) }
make: *** [testios] Terminated: 15
** BUILD INTERRUPTED **

jeremyhylton pushed a commit to jeremyhylton/cpython that referenced this pull request Aug 19, 2024
…place usage of the deprecated ``asyncio.iscoroutinefunction`` with the ``inspect.iscoroutinefunction`` (python#123088)

asyncio.iscoroutinefunction -> inspect.iscoroutinefunction
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
…place usage of the deprecated ``asyncio.iscoroutinefunction`` with the ``inspect.iscoroutinefunction`` (python#123088)

asyncio.iscoroutinefunction -> inspect.iscoroutinefunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants