[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-11-27 Thread Martin Panter

Martin Panter added the comment:

Eric seems to have retracted this proposal, however Issue 25752 has also been 
opened, which sounds very similar.

--
nosy: +martin.panter
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-28 Thread Eric V. Smith

Eric V. Smith added the comment:

I'm closing this as unneeded.

--
resolution:  -> rejected
stage:  -> resolved

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-27 Thread Eric V. Smith

Eric V. Smith added the comment:

Good point. I quick test of our sample code shows that calling regular readline 
to read up to '\n' does in fact work correctly. Let me do some more testing, 
then I'll likely close this.

Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm... Since \r\n ends with \n, what exactly would it help to pass in \r\n as 
the desired line ending? In either case the entire line (including the \r\n) 
would be returned.

Unless you have a need for treating foo\nbar\r\n as a single line? (But why 
would you?)  I'm guessing I'm missing something?

No worries about the bug/feature distinction, for asyncio we can do whatever we 
want (it's still provisional in 3.5).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-27 Thread Eric V. Smith

New submission from Eric V. Smith:

A group of us (all added as nosy) spent part of the day working on issue 25008 
(write an smtpd with asyncio).

We came across some code that contained a copy of StreamReader.readline, but it 
used b'\r\n' instead of b'\n' for a line ending character. In 
StreamReader.readline, '\n' is hard coded.

I'd like to propose that the line ending be passed in to readline, with a 
default of b'\n', and that multi-byte line ending sequences be explicitly 
supported.

Further, I'm hoping we can treat this as a bug and not a feature request, so 
that it can go in to 3.4 and 3.5. Adding a default parameter will be backward 
compatible.

--
components: asyncio
messages: 251732
nosy: akuchling, barry, eric.smith, gvanrossum, haypo, jason.coombs, 
r.david.murray, yselivanov
priority: normal
severity: normal
status: open
title: Hard-coded line ending in asyncio.streams.StreamReader.readline
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com