[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-04 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, your whole world will be turned upside-down. However, we have to do it one module at a time -- the approach will be different for each case. -- resolution: -> wont fix status: open -> closed ___ Python tracke

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Alexandre JABORSKA
Alexandre JABORSKA added the comment: Well, You're right, I'm confused, and I cannot use the http.client.parse_headers(). I made a workaround by reading all lines in a BytesIO and parse this one. Anyway, if it not possible to use a file like object with the asyncio module, which is absolu

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Guido van Rossum
Guido van Rossum added the comment: > > It seems to me that the StreamReader() limit parameter is for buffer size > while the io.BytesIO.readline() "n" parameter is for maximum number of > lines to be retreived, I guess. > You sound confused. The parameter for io.BytesIO.readline() limits the nu

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Alexandre JABORSKA
Alexandre JABORSKA added the comment: Hum... It seems to me that the StreamReader() limit parameter is for buffer size while the io.BytesIO.readline() "n" parameter is for maximum number of lines to be retreived, I guess. And since the StreamReader().readline() does not accept parameter, it

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread STINNER Victor
STINNER Victor added the comment: The readline() limit can be set in the StreamReader constructor: http://docs.python.org/dev/library/asyncio-stream.html#streamreader Oh, it looks like it is not documented :-( -- nosy: +gvanrossum, haypo, yselivanov

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: This prevent using StreamReader as a normal file object in some circumstances (like http header parsing) -- components: Library (Lib) messages: 212624 nosy: ajaborsk priority: normal severity: normal status: open title: asyncio.StreamReader.readli