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.

Author chris.jerdonek
Recipients asvetlov, bjs, chris.jerdonek, graingert, gvanrossum, pagliaricci.m, serhiy.storchaka, yselivanov
Date 2022-02-23.14:56:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
For future reference, with Andrew's change merged above, the traceback for the example snippet in my message above:
is now the following. Observe that (1) the call to sleep() continues to be present, but (2) without introducing two new intermediate CancelledErrors, which increase the verbosity of the traceback:

Traceback (most recent call last):
  File "/home/andrew/projects/cpython/", line 14, in <module>
  File "/home/andrew/projects/cpython/Lib/asyncio/", line 44, in run
    return loop.run_until_complete(main)
  File "/home/andrew/projects/cpython/Lib/asyncio/", line 640, in run_until_complete
    return future.result()
  File "/home/andrew/projects/cpython/", line 11, in main
    await task
  File "/home/andrew/projects/cpython/", line 5, in job
    await asyncio.sleep(5)
  File "/home/andrew/projects/cpython/Lib/asyncio/", line 619, in sleep
    return await future
asyncio.exceptions.CancelledError: cancel job

(This is copied from Andrew's comment in the PR here: )

Serhiy, can you provide a sample snippet for your case with output, like I did in my message linked above?
Date User Action Args
2022-02-23 14:56:27chris.jerdoneksetrecipients: + chris.jerdonek, gvanrossum, asvetlov, serhiy.storchaka, yselivanov, graingert, bjs, pagliaricci.m
2022-02-23 14:56:27chris.jerdoneksetmessageid: <>
2022-02-23 14:56:27chris.jerdoneklinkissue45390 messages
2022-02-23 14:56:27chris.jerdonekcreate