[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes -- resolution: -> fixed status: pending -> closed ___ Python tracker ___ ___ Python-bugs-lis

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-05-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I suppose it is fixed, isn't it? -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-l

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Benjamin Peterson
Benjamin Peterson 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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil
Senthil added the comment: With the changes r70935, this works. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil
Senthil 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". --

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Jeremy Hylton
Jeremy Hylton 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. -- ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> high resolution: accepted -> type: -> behavior versions: +Python 3.1 ___ Python tracker ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Antoine Pitrou
Antoine Pitrou 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() False

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil
Senthil 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") >>> print(f_string.read()) Tr

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r70928. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Jeremy Hylton
New submission from Jeremy Hylton : 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: normal status: o