You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-11-20.15:14:29.505>created_at=<Date2017-11-16.11:50:52.830>labels= ['3.7', 'expert-asyncio']
title='asyncio: enable debug mode when -X dev is used'updated_at=<Date2017-11-20.15:14:29.504>user='https://github.com/vstinner'
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 block_loop.py script which blocks the event loop.
(1) This command doesn't display anything:
haypo@selma$ ./python block_loop.py
(2) In developer mode, the warning a emitted to warn the developer about the bug:
$ ./python -X dev block_loop.py
Executing <Task finished coro=<block_loop() done, defined at block_loop.py:4> result=None created at /home/haypo/prog/python/master/Lib/asyncio/base_events.py:444> took 1.002 seconds
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: