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.

Title: _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored
Type: behavior Stage: resolved
Components: asyncio Versions: Python 3.8, Python 3.7, Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Fulvio Esposito, asvetlov, miss-islington, yselivanov
Priority: normal Keywords: patch

Created on 2016-04-21 17:34 by Fulvio Esposito, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit Fulvio Esposito, 2016-04-21 17:34 Minimal test case to reproduce the issue
Pull Requests
URL Status Linked Edit
PR 6921 merged zeffron, 2018-05-16 21:26
PR 7004 merged miss-islington, 2018-05-20 10:21
PR 7110 merged zeffron, 2018-05-25 07:18
Messages (4)
msg263927 - (view) Author: Fulvio Esposito (Fulvio Esposito) * Date: 2016-04-21 17:34
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.
msg317161 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-05-20 10:21
New changeset 4151061855b571bf8a7579daa7875b8e243057b9 by Andrew Svetlov (CtrlZvi) in branch 'master':
bpo-26819: Prevent proactor double read on resume (#6921)
msg317164 - (view) Author: miss-islington (miss-islington) Date: 2018-05-20 10:57
New changeset 28ea38b97b2bfbde9f387a8b90b02d05b93c895c by Miss Islington (bot) in branch '3.7':
bpo-26819: Prevent proactor double read on resume (GH-6921)
msg317661 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-05-25 08:03
New changeset 749afe81ec0a4b92ad6b89a67c82f2c04f79c5ac by Andrew Svetlov (CtrlZvi) in branch '3.6':
[3.6] bpo-26819: Prevent proactor double read on resume (GH-6921) (#7110)
Date User Action Args
2022-04-11 14:58:29adminsetgithub: 71006
2018-05-25 08:03:58asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-05-25 08:03:37asvetlovsetmessages: + msg317661
2018-05-25 07:18:46zeffronsetpull_requests: + pull_request6749
2018-05-20 15:09:07gvanrossumsetnosy: - gvanrossum
2018-05-20 10:57:35miss-islingtonsetnosy: + miss-islington
messages: + msg317164
2018-05-20 10:21:26miss-islingtonsetpull_requests: + pull_request6656
2018-05-20 10:21:19asvetlovsetnosy: + asvetlov
messages: + msg317161
2018-05-19 00:35:06vstinnersetnosy: - vstinner
2018-05-17 08:23:44serhiy.storchakasetversions: + Python 3.6, Python 3.7, Python 3.8, - Python 3.5
2018-05-16 21:26:23zeffronsetkeywords: + patch
stage: patch review
pull_requests: + pull_request6591
2016-04-21 17:34:00Fulvio Espositocreate