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.

classification
Title: StreamReaderProtocol.eof_received() should return True to keep the transport open
Type: Stage: resolved
Components: asyncio Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Drekin, asvetlov, aymeric.augustin, gvanrossum, python-dev, r.david.murray, vstinner, yselivanov
Priority: normal Keywords:

Created on 2015-06-30 12:54 by gvanrossum, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (11)
msg245986 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2015-06-30 12:54
See https://github.com/python/asyncio/issues/251. I'm on vacation and may or may not find the time to actually fix this (it needs a unittest written).
msg246248 - (view) Author: Adam Bartoš (Drekin) * Date: 2015-07-04 11:00
I've also been hit by this issue, see https://mail.python.org/pipermail/python-list/2015-July/693496.html and the following thread. I've spent some time trying to find where the problem is, and just after I found out it's about eof_received() returning None, I could found this issue. :-)
msg246728 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2015-07-14 11:10
I've added the return True from eof_received() to the asyncio repo (https://github.com/python/asyncio/commit/ce3ad816a2ef9456b4b1c26b99dfc85ea1236811), but it still needs a unittest and merging into CPython 3.4 and up.
msg247305 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-07-25 00:47
New changeset fc1d40a706e7 by Victor Stinner in branch '3.4':
asyncio: sync with github
https://hg.python.org/cpython/rev/fc1d40a706e7
msg247306 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-07-25 00:52
> but it still needs a unittest and merging into CPython 3.4 and up.

I did this part.

By the way, running unit tests now logs two warnings on SSL tests, because returning True has no effect on SSL. We may just remove the warning at runtime and ensure that it's well documented instead. What do you think?
msg253782 - (view) Author: Aymeric Augustin (aymeric.augustin) * Date: 2015-10-31 11:13
This change appears to have caused a non-obvious regression in `websockets`: https://github.com/aaugustin/websockets/issues/76

Perhaps I was relying on an implementation detail but that's annoying nonetheless.
msg253791 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-10-31 14:35
Well, asyncio was still provisional, so annoyances like this were bound to happen occasionally.

Victor, is there a reason this issue is still open?  Is it because of the warnings question?  Maybe that should be a new issue?
msg253793 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2015-10-31 14:58
Well, the warning points to a deeper issue -- the fix doesn't work for TLS
connections. Also, the upstream issue (
https://github.com/python/asyncio/issues/251) is still open because there's
no test for this behavior.
msg253795 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-10-31 15:02
Ah, I thought Victor was saying he'd done the unit test; I guess he just meant he'd done the merge.
msg253809 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-10-31 21:29
"Victor, is there a reason this issue is still open?  Is it because of the warnings question?  Maybe that should be a new issue?"

I just merged from Github to CPython. I don't know if something remains to do in this issue.
msg308817 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-20 21:11
Done two years ago.
History
Date User Action Args
2022-04-11 14:58:18adminsetgithub: 68727
2017-12-20 21:11:18asvetlovsetstatus: open -> closed

nosy: + asvetlov
messages: + msg308817

resolution: fixed
stage: needs patch -> resolved
2015-10-31 21:29:13vstinnersetmessages: + msg253809
2015-10-31 15:02:15r.david.murraysetmessages: + msg253795
stage: needs patch
2015-10-31 14:58:08gvanrossumsetmessages: + msg253793
2015-10-31 14:35:39r.david.murraysetnosy: + r.david.murray
messages: + msg253791
2015-10-31 11:13:24aymeric.augustinsetnosy: + aymeric.augustin
messages: + msg253782
2015-07-25 00:52:31vstinnersetmessages: + msg247306
2015-07-25 00:47:22python-devsetnosy: + python-dev
messages: + msg247305
2015-07-14 11:10:47gvanrossumsetmessages: + msg246728
2015-07-04 11:00:02Drekinsetnosy: + Drekin
messages: + msg246248
2015-06-30 12:54:46gvanrossumcreate