New submission from Fulvio Esposito:

Calling pause_reading()/resume_reading() on a _ProactorReadPipeTransport will 
result in an InvalidStateError('Result is not ready.') from a future if no read 
has been issued yet. The reason is that resume_reading() will schedule 
_loop_reading() a second time on the event loop. For example, currently 
aiomysql always fails to connect using a ProactorEventLoop on Windows because 
it calls pause_reading()/resume_reading() to set TCP_NODELAY on the socket just 
after connecting and before any read is performed.

----------
components: asyncio
files: pause_resume_test.py
messages: 263927
nosy: Fulvio Esposito, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: _ProactorReadPipeTransport pause_reading()/resume_reading() broken if 
called before any read is perfored
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42559/pause_resume_test.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26819>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to