Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue39191

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Coroutine is awaited despite an exception in run_until_complete()
Type:behaviorStage:resolved
Components:asyncioVersions:Python 3.9, Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: asvetlovNosy List: asvetlov, dkaveshnikov, miss-islington, xtreak, yselivanov
Priority:normalKeywords:patch

Created on2020-01-02 13:34 bydkaveshnikov, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
test_event_loop.pydkaveshnikov,2020-01-02 13:34Snippet
Pull Requests
URLStatusLinkedEdit
PR 17796mergedasvetlov,2020-01-02 15:29
PR 17820mergedasvetlov,2020-01-04 09:16
PR 17821mergedasvetlov,2020-01-04 09:24
PR 17863mergedasvetlov,2020-01-06 12:03
PR 17894mergedasvetlov,2020-01-07 13:25
PR 17895closedasvetlov,2020-01-07 13:28
Messages (9)
msg359196 -(view)Author: Kaveshnikov Denis (dkaveshnikov)Date: 2020-01-02 13:34
Hi, I found that if to call run_until_complete() in the task while the event loop will be running, a coroutine sent to run_until_complete() will be performed despite the exception raised from run_until_complete().It seems to me, it would be better to cancel such a coroutine or just do nothing with it.
msg359201 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2020-01-02 15:25
Agree, this is a bug.
msg359281 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2020-01-04 09:49
New changeset867d8333ce6a7f74191ad464acc609d4a04e4acb by Andrew Svetlov in branch '3.8':[3.8]bpo-39191: Don't spawn a task before failing (GH-17796) (GH-17820)https://github.com/python/cpython/commit/867d8333ce6a7f74191ad464acc609d4a04e4acb
msg359282 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2020-01-04 09:49
New changeset9c145e19fba53369da5cd23a1e71de489836f827 by Andrew Svetlov in branch '3.7':[3.7]bpo-39191: Don't spawn a task before failing (GH-17796) (#17821)https://github.com/python/cpython/commit/9c145e19fba53369da5cd23a1e71de489836f827
msg359415 -(view)Author: Karthikeyan Singaravelan (xtreak)*(Python committer)Date: 2020-01-06 10:24
This commit seems to generate some warnings in the nested run_until_complete test. The check for running loop is now done at run_until_complete itself before going through the below code in it to create a future and raised a RuntimeError by run_forever as the test used to do. Not sure why CI doesn't have these warnings.PYTHONWARNINGS=always ./python.exe -m test test_asyncio -m test_run_until_complete_nesting0:00:00 load avg: 2.16 Run tests sequentially0:00:00 load avg: 2.16 [1/1] test_asyncio/Users/kasingar/stuff/python/cpython/Lib/traceback.py:220: RuntimeWarning: coroutine 'EventLoopTestsMixin.test_run_until_complete_nesting.<locals>.coro1' was never awaited  tb.tb_frame.clear()RuntimeWarning: Enable tracemalloc to get the object allocation traceback/Users/kasingar/stuff/python/cpython/Lib/traceback.py:220: RuntimeWarning: coroutine 'EventLoopTestsMixin.test_run_until_complete_nesting.<locals>.coro1' was never awaited  tb.tb_frame.clear()RuntimeWarning: Enable tracemalloc to get the object allocation traceback/Users/kasingar/stuff/python/cpython/Lib/traceback.py:220: RuntimeWarning: coroutine 'EventLoopTestsMixin.test_run_until_complete_nesting.<locals>.coro1' was never awaited  tb.tb_frame.clear()RuntimeWarning: Enable tracemalloc to get the object allocation traceback== Tests result: SUCCESS ==1 test OK.Total duration: 164 msTests result: SUCCESS
msg359417 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2020-01-06 11:48
Ooh, you are right.The warning is printed only, test runner thinks that the test is ok.I'll prepare a quick fix.
msg359418 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2020-01-06 11:48
Thanks for the report!
msg359509 -(view)Author: miss-islington (miss-islington)Date: 2020-01-07 13:23
New changeset10ac0cded26d91c3468e5e5a87cecad7fc0bcebd by Miss Islington (bot) (Andrew Svetlov) in branch 'master':bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863)https://github.com/python/cpython/commit/10ac0cded26d91c3468e5e5a87cecad7fc0bcebd
msg359513 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2020-01-07 14:55
New changeset4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8 by Andrew Svetlov in branch '3.8':[3.8]bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863) (#17894)https://github.com/python/cpython/commit/4112a3da2e01ecc19e9f54b8ac7b383b6f5e85c8
History
DateUserActionArgs
2022-04-11 14:59:24adminsetgithub: 83372
2020-01-07 14:55:35asvetlovsetstatus: open -> closed
stage: patch review -> resolved
2020-01-07 14:55:22asvetlovsetmessages: +msg359513
2020-01-07 13:28:24asvetlovsetpull_requests: +pull_request17305
2020-01-07 13:25:47asvetlovsetpull_requests: +pull_request17304
2020-01-07 13:23:08miss-islingtonsetnosy: +miss-islington
messages: +msg359509
2020-01-06 12:03:12asvetlovsetstage: resolved -> patch review
pull_requests: +pull_request17280
2020-01-06 11:48:35asvetlovsetmessages: +msg359418
2020-01-06 11:48:24asvetlovsetstatus: closed -> open
assignee:asvetlov
messages: +msg359417
2020-01-06 10:24:05xtreaksetnosy: +xtreak
messages: +msg359415
2020-01-04 09:49:51asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-01-04 09:49:36asvetlovsetmessages: +msg359282
2020-01-04 09:49:22asvetlovsetmessages: +msg359281
2020-01-04 09:24:36asvetlovsetpull_requests: +pull_request17247
2020-01-04 09:16:02asvetlovsetpull_requests: +pull_request17246
2020-01-02 15:29:45asvetlovsetkeywords: +patch
stage: patch review
pull_requests: +pull_request17231
2020-01-02 15:25:25asvetlovsetmessages: +msg359201
versions: + Python 3.8, Python 3.9
2020-01-02 13:34:18dkaveshnikovcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp