Roundup Robot added the comment:
New changeset 6cc5bbfcf04e by Serhiy Storchaka in branch '3.2':
Issue #16723: httplib.HTTPResponse no longer marked closed when the connection
http://hg.python.org/cpython/rev/6cc5bbfcf04e
New changeset 0461ed77ee4e by Serhiy Storchaka in branch '3.3':
Issue
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
Serhiy Storchaka added the comment:
Senthil, Antoine, anyone, what you think about this patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
___
Antoine Pitrou added the comment:
This looks ok to me. I am slightly surprised that isclosed() isn't documented
anywhere (but perhaps it's better).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
___
___
Serhiy Storchaka added the comment:
Here is a patch which fixes HTTPResponse's end. closed property no longer
settled automatically, but only after explicit close().
--
components: +IO, Library (Lib)
keywords: +patch
nosy: +orsenthil
stage: - patch review
versions: +Python 3.2, Python
David Beazley added the comment:
I have run into this bug myself. Agree that a file-like object should never
report itself as closed unless .close() has been explicitly called on it.
HTTPResponse should not return itself as closed after the end-of-file has been
reached.
I think there is
Amaury Forgeot d'Arc added the comment:
Hum, io objects are not supposed to close themselves when they run out of data.
Even if HTTPResponse chooses to close the underlying socket (to clean unused
resources?), it should not report itself as a closed io.IOBase.
Subsequent calls read() should
Serhiy Storchaka added the comment:
This looks as a known bug in io.TextIOWrapper which call read() even previous
read() returned an empty data. There was a related issue, I can't found it now.
--
nosy: +serhiy.storchaka
___
Python tracker
Amaury Forgeot d'Arc added the comment:
buffer.read() never returns empty data in this case.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
___
Changes by Wibowo Arindrarto b...@bow.web.id:
--
nosy: +bow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Indeed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16723
___
___
Python-bugs-list mailing list
New submission from Michiel de Hoon:
I am trying to use io.TextIOWrapper to wrap a handle returned by
urllib.request.urlopen. Reading line-by-line from the wrapped handle terminates
prematurely.
As an example, consider this script:
import urllib.request
import io
url =
13 matches
Mail list logo