Message23485
Logged In: YES
user_id=89016
I couldn't get Linux Python to crash or assert with the
attached gurk.py, Windows Python crashed at i=70.
The problem we have is that Python 2.4 changed the meaning
of the size parameter in StreamReader.readline(). There are
at least four possible interpretations:
1) Never read more than size bytes from the underlying byte
stream in one call to readline()
2) Never read more than size characters from the underlying
byte stream in one call to readline()
3) If calling readline() requires reading from the underlying
byte stream, do the reading in chunks of size bytes.
4) Never return more than size characters from readline(), if
there's no linefeed within size characters the result is a partial
line.
In Python 2.3 1) was used with the implicit assumption that
this guarantees that the result will never be longer than size.
You're patch looks like it could restore the old behaviour, but
we'd loose the ability to reliably read a line until a "\n" is
available without passing size=-1 into read() with would read
the whole stream. |
|
Date |
User |
Action |
Args |
2007-08-23 14:28:03 | admin | link | issue1076985 messages |
2007-08-23 14:28:03 | admin | create | |
|