[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 2.7 is affected too. Thank you Simon Sapin for your contribution. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebace0a5a33e by Serhiy Storchaka in branch '2.7': Issue #20007: HTTPResponse.read(0) no more prematurely closes connection. http://hg.python.org/cpython/rev/ebace0a5a33e New changeset 47ae858cd661 by Serhiy Storchaka in branch '3.3': Issue #20007: H

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Simon Sapin
Simon Sapin added the comment: I could reproduce on 3.3.3 and tip, but not 3.2.3 or 2.7.6. -- versions: +Python 3.5 -Python 2.7 ___ Python tracker ___ ___

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Simon Sapin
Simon Sapin added the comment: html5lib issue: https://github.com/html5lib/html5lib-python/issues/127 -- ___ Python tracker ___ ___ Py

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +orsenthil, serhiy.storchaka stage: -> patch review versions: +Python 2.7, Python 3.3, Python 3.4 ___ Python tracker ___ _

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Simon Sapin
Simon Sapin added the comment: Adding a proposed patch. -- keywords: +patch Added file: http://bugs.python.org/file33179/python-issue20007.diff ___ Python tracker ___ ___

[issue20007] .read(0) on http.client.HTTPResponse drops the rest of the content

2013-12-17 Thread Simon Sapin
New submission from Simon Sapin: When given a file-like object, html5lib calls .read(0) in order to check if the result is bytes or Unicode: https://github.com/html5lib/html5lib-python/blob/e269a2fd0aafcd83af7cf1e65bba65c0e5a2c18b/html5lib/inputstream.py#L434 When given the result of urllib.cl