Andrew McNabb <amcn...@mcnabbs.org> added the comment:

It looks like encodings/zlib_codec.py defines a custom IncrementalEncoder and 
IncrementalDecoder, but its StreamWriter and StreamReader rely on the standard 
implementation of codecs.StreamWriter and codecs.StreamReader.

One solution might be to have zlib_codec.StreamWriter inherit from 
zlib_codec.IncrementalEncoder instead of from zlib_encoder.Codec. I'm not 
familiar enough with the codecs library to know whether this is the best 
approach.

Unfortunately, there are 120 codec files in the encodings directory, and it's 
unclear how many of them would need to be modified. Based on the number of them 
that implement StreamWriter as "class StreamWriter(Codec,codecs.StreamWriter)", 
it looks like it might be a lot of them. Was each of these 120 files 
hand-written?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13881>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to