Re: [issue20132] Many incremental codecs don’t handle fragmented data

M.-A. Lemburg mal at egenix.com
Fri Jan 16 00:02:38 CET 2015


On 15.01.2015 23:46, Martin Panter wrote:
> 
> I opened Issue 23231 about fixing iterencode() and iterdecode() in the general case. I added a patch to Issue 13881 to fix StreamWriter for zlib and bz2, and to fix StreamWriter.writelines() in general.
> 
> I am adding a patch here to clarify the StreamReader API and fix the StreamReader for the zlib-codec.

Martin, I must be missing some context: what's your master plan with
all these codec patches and open tickets ?

They are very hard to follow and you're making design changes which
need more review and discussion than can easily be done on a few tickets.

Regarding the patch:

The doc patch seems to just change ordering of sentences and paragraphs.
Without additional explanation, it's difficult to determine whether
you are changing semantics or not.

The "strict" error change is not correct. Most codecs raise a UnicodeError
(which is a ValueError subclass) and code expects codecs that work
on Unicode to return a UnicodeError, not a ValueError. Only codecs that
do not work on Unicode are allowed to raise ValueErrors.

-- 
Marc-Andre Lemburg
eGenix.com



More information about the Python-bugs-list mailing list