[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-05-14 Thread Antoine Pitrou
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 ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-05-14 Thread Benjamin Peterson
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 ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Antoine Pitrou
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 ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil
Senthil orsent...@gmail.com added the comment: With the changes r70935, this works. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5628 ___ ___

[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

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