[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-10-14 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker ___ __

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-10-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 402eba63650c by Martin Panter in branch '3.5': Issue #23231: Document codecs.iterencode(), iterdecode() shortcomings https://hg.python.org/cpython/rev/402eba63650c New changeset 0837940bcb9f by Martin Panter in branch '3.6': Issue #23231: Merge code

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > it might be simpler to document that Agreed. -- assignee: serhiy.storchaka -> martin.panter nosy: +r.david.murray ___ Python tracker ___ __

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Here is my documentation proposal. -- components: +Documentation -Library (Lib) stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file44164/iter-unsupported.patch ___ Python tracker

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Serhiy’s two proposals won’t work for codecs that include non-zero output for zero input: >>> tuple(iterencode((), "utf-8-sig")) (b'\xef\xbb\xbf',) >>> encode(b"", "uu") b'begin 666 \n \nend\n' >>> encode(b"", "zlib") b'x\x9c\x03\x00\x00\x00\x00\x01' However I

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-12-19 Thread R. David Murray
Changes by R. David Murray : -- Removed message: http://bugs.python.org/msg256747 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-12-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: -Ruel Net1400 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-12-19 Thread Ruel Net1400
Ruel Net1400 added the comment: ReadMe -- nosy: +Ruel Net1400 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch changes public interface. This breaks compatibility with third-party codecs implementing it. We have found other solution to iterencode/iterdecode problem. For example we can buffer iterated values and encode with one step delay: prev = sentin

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list ma

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-01-17 Thread Martin Panter
Martin Panter added the comment: Another idea that doesn’t involve changing the incremental codec APIs is kind of described in : to add format parameters to iterencode() and iterdecode(), which would allow it to determine the right data type to fina

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-01-13 Thread Martin Panter
Martin Panter added the comment: Original patch has lots of whitespace changes, probably due to generated codec code not being regenerated for a long time. This diff ignores the space changes, so should be easier to review. -- Added file: http://bugs.python.org/file37692/final-no-objec

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-01-13 Thread Martin Panter
New submission from Martin Panter: As mentioned in Issue 20132, iterencode() and iterdecode() only work on text-to-byte codecs, because they assume particular data types when finalizing the incremental codecs. This patch changes the signature of the IncrementalEncoder and IncrementalDecoder me