Author vstinner
Recipients vstinner, yselivanov
Date 2017-11-16.11:50:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The bpo-32043 added a new "developer mode" enabled with the new -X dev command line option.

I propose to enable asyncio debug mode with the global Python "developer mode".

If an asyncio application is correctly written, the single side effect of -X dev would be to log "Executing ... took ... seconds" if a handle took longer than 100 ms. Well, a handle should *not* take longer than 100 ms. So maybe it's ok to start logging such events in the "developer mode", no?

Example with attached script which blocks the event loop.

(1) This command doesn't display anything:

haypo@selma$ ./python 

(2) In developer mode, the warning a emitted to warn the developer about the bug:

$ ./python -X dev 
Executing <Task finished coro=<block_loop() done, defined at> result=None created at /home/haypo/prog/python/master/Lib/asyncio/> took 1.002 seconds
Date User Action Args
2017-11-16 11:50:52vstinnersetrecipients: + vstinner, yselivanov
2017-11-16 11:50:52vstinnersetmessageid: <>
2017-11-16 11:50:52vstinnerlinkissue32047 messages
2017-11-16 11:50:52vstinnercreate