]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (GH-7005)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 20 May 2018 14:34:28 +0000 (07:34 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 20 May 2018 14:34:28 +0000 (17:34 +0300)
commit52d1741c954448cd9ce3f705402e88211b8d4136
treeed7b9d864627c4aa92457a4c8a00786662fb0bf5
parent28ea38b97b2bfbde9f387a8b90b02d05b93c895c
bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (GH-7005)

Fix the following bugs in the C implementation:

* get_future_loop() silenced all exceptions raised when look up the get_loop
  attribute, not just an AttributeError.
* enter_task() silenced all exceptions raised when look up the current task,
  not just a KeyError.
* repr() was called for a borrowed link in enter_task() and task_step_impl().
* str() was used instead of repr() in formatting one error message (in
  Python implementation too).
* There where few reference leaks in error cases.
(cherry picked from commit 6655354afcd116c27486bb5ba1dfa50b369d8d85)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/asyncio/tasks.py
Modules/_asynciomodule.c