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.

Title: Add Task.get_loop() and Future.get_loop()
Type: Stage: resolved
Components: asyncio Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: yselivanov Nosy List: asvetlov, yselivanov
Priority: normal Keywords: patch

Created on 2017-12-23 16:59 by yselivanov, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4992 merged yselivanov, 2017-12-23 17:46
PR 4995 merged yselivanov, 2017-12-23 20:19
PR 4999 merged yselivanov, 2017-12-23 21:10
Messages (5)
msg308957 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-23 16:59
Currently, asyncio code accesses Future._loop and Task._loop property to validate the event loop and implement functions like "Task.all_tasks()".  So the "_loop" is a semi-official public API that other Task & Future implementations must follow in order to be compatible with asyncio code.

I propose to add Future.get_loop() and Task.get_loop() methods, and soft-deprecate ._loop property.
msg308958 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-23 17:00
msg308966 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-23 20:04
New changeset ca9b36cd1a384e5ecb56d9df9a59144240353ef0 by Yury Selivanov in branch 'master':
bpo-32415: Add asyncio.Task.get_loop() and Future.get_loop() (#4992)
msg308968 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-23 20:42
New changeset a8fb07978953d3f55cfce836e3669d8b8e82b4c1 by Yury Selivanov in branch 'master':
bpo-32415: Add more tests (#4995)
msg308971 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-23 21:29
New changeset 719ccbca69b21013a783b829de3404b5aa243827 by Yury Selivanov in branch 'master':
bpo-32415: Fix "error is already set" (#4999)
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76596
2017-12-23 21:29:28yselivanovsetmessages: + msg308971
2017-12-23 21:10:50yselivanovsetpull_requests: + pull_request4887
2017-12-23 20:42:29yselivanovsetmessages: + msg308968
2017-12-23 20:19:01yselivanovsetpull_requests: + pull_request4884
2017-12-23 20:08:07yselivanovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-12-23 20:04:17yselivanovsetmessages: + msg308966
2017-12-23 17:46:20yselivanovsetkeywords: + patch
stage: patch review
pull_requests: + pull_request4880
2017-12-23 17:00:16asvetlovsetmessages: + msg308958
2017-12-23 16:59:11yselivanovcreate