[issue25752] asyncio.readline - add customizable line separator

2016-01-13 Thread Марк Коренберг

Марк Коренберг added the comment:

During development, we decide not to change readline() function. So, yes, this 
issue is closed.

--

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2016-01-13 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2016-01-12 Thread Martin Panter

Martin Panter added the comment:

The same Git Hub pull request is mentioned in Issue 26050, so I am guessing 
this is now a duplicate.

--
nosy: +martin.panter
resolution: wont fix -> duplicate
status: open -> closed
superseder:  -> Add new StreamReader.readuntil() method

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2015-12-20 Thread Марк Коренберг

Марк Коренберг added the comment:

ReadStream.read_until() has been implemented instead enhancing readline().

--
resolution:  -> wont fix

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2015-11-29 Thread Марк Коренберг

Марк Коренберг added the comment:

Well, https://github.com/python/asyncio/pull/297 is ready :)

--

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2015-11-29 Thread Guido van Rossum

Guido van Rossum added the comment:

If you hit EOF in the middle of a partial separator, treat it as a premature 
EOF just as if you hit EOF before the separator -- the record is not properly 
terminated so it shouldn't be accepted.

I prefer a single PR that has the full code.

We keep the CPython Lib version and the asyncio repo synchronized, a PR for the 
asyncio repo is easier to handle for me.

--

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2015-11-29 Thread Марк Коренберг

Марк Коренберг added the comment:

When I reported that bug, I want to suggest multibyte separators, but 
implementation is much complex than current one. For example, we should decide 
what to do if partial separator is read and EOF occur.

So, I think we should merge ability to use custom one-byte separator, and next 
create another pull-request to make support of multibyte separator (like 
'\r\n').

Okay, I can make pull request on asyncio, but asyncio now is the part of 
Python. Does not it ?

--

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2015-11-27 Thread STINNER Victor

STINNER Victor added the comment:

I like the idea. It's common in protocols to have different kinds of
"terminators" to mark the end of a message. C strings use a null byte
for example. I would be trivial to accept other terminators, since we
don't store received bytes as lines, but as a raw byte string
(technically in a bytearray).

> if not isinstance(separator, bytes) or len(separator) != 1:

Yes, we should only reject empty terminator string. But terminator
strings of more than 1 character are fine, no? I don't think that we
need to put an arbitrary limitation here.

> Since I cannot create pull-request, I will write just here what I want:

Oh, what is your problem? You can use https://github.com/python/asyncio

--

___
Python tracker 

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