Antoine Pitrou pit...@free.fr added the comment:
I suppose it is fixed, isn't it?
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5628
___
Benjamin Peterson benja...@python.org added the comment:
Yes
--
resolution: - fixed
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5628
___
New submission from Jeremy Hylton jer...@alum.mit.edu:
import io
import urllib.request
f_bytes = urllib.request.urlopen(http://www.python.org/;)
f_string = io.TextIOWrapper(f_bytes, iso-8859-1)
print(f_string.read())
--
components: Library (Lib)
messages: 84840
nosy: jhylton
severity:
Benjamin Peterson benja...@python.org added the comment:
Fixed in r70928.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5628
Senthil orsent...@gmail.com added the comment:
Nope, this is not yet fixed.
$ ./python
Python 3.1a1+ (py3k:70929, Mar 31 2009, 19:18:12)
[GCC 4.3.2] on linux2
...
...
f_bytes = urllib.request.urlopen(http://www.python.org;)
f_string = io.TextIOWrapper(f_bytes,iso-8859-1)
Antoine Pitrou pit...@free.fr added the comment:
urllib.response.addinfourl doesn't seem to implement the required ABC
(BufferedIOBase) properly. It misses the read1() method. Also, it claims
not to be readable:
f_bytes = urllib.request.urlopen(http://www.python.org/;)
f_bytes.readable()
Changes by Antoine Pitrou pit...@free.fr:
--
priority: - high
resolution: accepted -
type: - behavior
versions: +Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5628
___
Jeremy Hylton jer...@alum.mit.edu added the comment:
I just wanted to mention that the current head of py3k returns an
http.client.HTTPResponse and not a urllib.respone.addinfourl. That
doesn't mean it is the right thing to pass to TextIOWrapper. It's an
instance of RawIOBase.
--
Senthil orsent...@gmail.com added the comment:
Jeremy Hylton wrote:
That doesn't mean it is the right thing to pass to TextIOWrapper. It's an
instance of RawIOBase.
I guess, you meant That doesn't mean it is *not* the right thing to
pass to TextIOWrapper.
--
Senthil orsent...@gmail.com added the comment:
With the changes r70935, this works.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5628
___
___
Benjamin Peterson benja...@python.org added the comment:
Please note that passing a instance of RawIOBase (as HTTPResponse) is
to TextIOWrapper is *not* supported. You must first wrap the raw IO in
a BufferIOBase instance.
--
___
Python tracker
11 matches
Mail list logo