[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 463a09a3bfff by Victor Stinner in branch 'default': Issue #25357: Add an optional newline paramer to binascii.b2a_base64(). https://hg.python.org/cpython/rev/463a09a3bfff -- nosy: +python-dev ___ Python

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-11 Thread STINNER Victor
STINNER Victor added the comment: Thanks for reviews Serhiy & Martin. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With Martin's comments the patch LGTM. -- ___ Python tracker ___ ___

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Martin Panter
Martin Panter added the comment: The “newline” name seems as good as any. The patch looks good in general. I left a few comments. I agree with not bothering for the UU encoder. That encoding has an embedded line length byte at the start of each line, so it makes less sense to omit newlines.

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor
New submission from STINNER Victor: The base64.b64encode() function calls binascii.b2a_base64() and then strips the newline. It would be more efficient to directly not add a newline. Attached patch adds an optional newline parameter to binascii.b2a_base64(). It also modifies

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +1. Not sure about the parameter name, but if no one suggests better, it LGTM. Added comments on Rietveld. What about adding the same parameter to binascii.b2a_uu()? -- nosy: +ncoghlan, pitrou, serhiy.storchaka

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to add an unit test. > What about adding the same parameter to binascii.b2a_uu()? This function is used in Lib/encodings/uu_codec.py and Lib/uu.py, but the newline is not stripped. So I don't think that it's worth to add an optional parameter.

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor
STINNER Victor added the comment: Updated patch to take Serhiy's comments in account and now with an unit test! -- Added file: http://bugs.python.org/file40733/binascii_b2a_base64_newline-2.patch ___ Python tracker

[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor
STINNER Victor added the comment: Oh by the way, the new parameter is a keyword only parameter. It's not possible to write b2a_base64(data, False). Maybe I should also add an unit test for this. -- ___ Python tracker