Message101988
Amaury Forgeot d'Arc wrote:
>
> Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:
>
> Buffering applies when writing, not when reading a file.
>
> There is indeed a problem in codecs.py: after a readline(), read() will return the content of the internal buffer, and not more.
>
> The "size" parameter is a hint, and should not be used to decide whether the character buffer is enough to satisfy the read() request.
> Patch is attached, with test.
Agreed.
The patch looks good except the if-line should read:
if chars >= 0 and len(self.charbuffer) >= chars:
...
Thanks,
--
Marc-Andre Lemburg
eGenix.com
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/ |
|
Date |
User |
Action |
Args |
2010-03-31 10:28:23 | lemburg | set | recipients:
+ lemburg, amaury.forgeotdarc, ajaksu2, harobed |
2010-03-31 10:28:20 | lemburg | link | issue8260 messages |
2010-03-31 10:28:19 | lemburg | create | |
|