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

Eric V. Smith report at bugs.python.org
Mon Sep 28 00:34:35 CEST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue25252>
_______________________________________


More information about the New-bugs-announce mailing list