[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-07-15 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- dependencies: +Fix codecs.iterencode/decode() by allowing data parameter to be omitted stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is patch v4. The stream writer is now automatically generated by default by the CodecInfo constructor if no custom stream writer parameter is supplied. The base64 and quopri codecs are adjusted to also use this default stream writer to help with Issue

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-15 Thread Martin Panter
Martin Panter added the comment: Sorry, I changed the name of the attribute and forgot to update the doc string. Its new name was _Encoder. Your description was fairly accurate. I am adding patch v3, with an expanded the doc string. Hopefully that explains it a bit better. Since it is just

Re: [issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-15 Thread M.-A. Lemburg
On 15.01.2015 05:43, Martin Panter wrote: New patch that also fixes StreamWriter.writelines() in general for the byte codecs Could you explain this new undocumented class ? +class _IncrementalBasedWriter(StreamWriter): +Generic StreamWriter implementation. + +The _EncoderClass

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-14 Thread Martin Panter
Martin Panter added the comment: New patch that also fixes StreamWriter.writelines() in general for the byte codecs -- Added file: http://bugs.python.org/file37710/zlib-bz2-writer.v2.patch ___ Python tracker rep...@bugs.python.org

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-13 Thread Martin Panter
Martin Panter added the comment: Here is a patch to implement the zlib-codec and bz2-codec StreamWriter classes based on their IncrementalEncoder classes. It depends on my patch for Issue 23231, though I guess it could be tweaked to work around that if desired. -- keywords: +patch

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-13 Thread Martin Panter
Martin Panter added the comment: See Issue 23231 for a proposal which should make the incremental codec API compatible with a generic StreamReader/Writer class. I discovered that many of the codec files are generated by gencodec.py, not hand-written. However when I tried regenerating them, I

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-09-09 Thread Martin Panter
Martin Panter added the comment: The corresponding stream reader has a related issue which I mentioned in Issue 20132 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-09-09 Thread Martin Panter
Martin Panter added the comment: Even if all these issues aren’t worth fixing, I think the documentation should at least say which codecs work fully (e.g. most text encodings), which ones work suboptimally (e.g. UTF-7), and which ones only work for single-shot encoding and decoding.

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-10 Thread Walter Dörwald
Walter Dörwald added the comment: The stream part of the codecs isn't used that much in Python 3 any more, so I'm not sure if this is worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-05 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___ ___ Python-bugs-list

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +doerwalter, lemburg, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___ ___

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-02-14 Thread Andrew McNabb
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

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-02-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___ ___ Python-bugs-list

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-02-14 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: See also issue #7475. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___ ___

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-02-11 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Andrew, could you possibly write a patch and a test for 3.3? -- nosy: +jcea versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-01-26 Thread Andrew McNabb
New submission from Andrew McNabb amcn...@mcnabbs.org: The stream encoder for the zlib_codec doesn't use the incremental encoder, so it has limited usefulness in practice. This is easiest to show with an example. Here is the behavior with the stream encoder: filelike = io.BytesIO() wrapped