[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-20 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 44862df2eeec62adea20672b0fe2a5d3e160569e by Victor Stinner in 
branch 'master':
bpo-32047: -X dev enables asyncio debug mode (#4418)
https://github.com/python/cpython/commit/44862df2eeec62adea20672b0fe2a5d3e160569e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-20 Thread STINNER Victor

Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-16 Thread STINNER Victor

STINNER Victor  added the comment:

I sent an email about this change to python-dev: 
https://mail.python.org/pipermail/python-dev/2017-November/150572.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-16 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +4367
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-16 Thread STINNER Victor

New submission from STINNER Victor :

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  
result=None created at 
/home/haypo/prog/python/master/Lib/asyncio/base_events.py:444> took 1.002 
seconds

--
components: asyncio
files: block_loop.py
messages: 306353
nosy: haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: enable debug mode when -X dev is used
versions: Python 3.7
Added file: https://bugs.python.org/file47269/block_loop.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com