E5E2 bpo-46829: Deprecate passing a message into Future.cancel() and Task.cancel() by asvetlov · Pull Request #31840 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix notes
  • Loading branch information
asvetlov committed Mar 12, 2022
commit 55b43fd98418ad7b763df13f86ed6c87c8c6ad79
8 changes: 1 addition & 7 deletions Lib/test/test_asyncio/test_taskgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,10 @@ async def runner():
await asyncio.sleep(0.1)

self.assertFalse(r.done())
with self.assertWarnsRegex(
DeprecationWarning,
"Passing 'msg' argument"
):
r.cancel("test")
r.cancel()
with self.assertRaises(asyncio.CancelledError) as cm:
await r

self.assertEqual(cm.exception.args, ('test',))

self.assertEqual(NUM, 5)

async def test_taskgroup_07(self):
Expand Down
0