This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Check that the global settings for asyncio are not changed by tests
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, brett.cannon, giampaolo.rodola, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2018-05-17 20:49 by brett.cannon, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6958 closed brett.cannon, 2018-05-17 21:03
PR 7328 merged brett.cannon, 2018-06-01 21:26
Messages (2)
msg316985 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-05-17 20:49
There were not checks in test.libregrtest.save_env to make sure tests were not mucking with the default event loop. The settings to check seem to be:

'asyncio.get_event_loop_policy', 'asyncio.get_event_loop',
'asyncio_get_exception_handler', 'asyncio_get_debug',
'asyncio_get_child_watcher',

I have a PR that I'm working on that checks these things and it looks like the following tests are being a little sloppy:

test_asyncgen
test_contextlib_async
test_coroutines
test_socket
test_sys_settrace

And test_asyncio never seems to complete.
msg318485 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-06-02 03:34
New changeset 8425de4147eb8d83befbb8ea77516fc764bb4309 by Brett Cannon in branch 'master':
bpo-33562: Check the global asyncio event loop policy isn't set after any tests (GH-7328)
https://github.com/python/cpython/commit/8425de4147eb8d83befbb8ea77516fc764bb4309
History
Date User Action Args
2022-04-11 14:59:00adminsetgithub: 77743
2018-06-02 03:34:28brett.cannonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-06-02 03:34:13brett.cannonsetmessages: + msg318485
2018-06-01 21:26:49brett.cannonsetpull_requests: + pull_request6957
2018-05-22 20:34:54vstinnersetnosy: + vstinner
2018-05-17 21:03:16brett.cannonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request6617
2018-05-17 20:49:30brett.cannoncreate