[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 277b36596a54 by Serhiy Storchaka in branch '3.5': Issue #29073: bytearray formatting no longer truncates on first null byte. https://hg.python.org/cpython/rev/277b36596a54 New changeset 9b77e3a586b0 by Serhiy Storchaka in branch '3.6': Issue #29073:

[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, there is an inconsistency between bytes and bytearray in 3.5: >>> b'a\0b' % () b'a\x00b' >>> bytearray(b'a\0b') % () bytearray(b'a') It was unintentionally fixed in issue25399. Proposed patch fixes the issue. -- keywords: +patch nosy: +ethan

[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-26 Thread Russell Keith-Magee
Russell Keith-Magee added the comment: Since I was named dropped; it's worth pointing out that this has evidently been fixed - intentionally or otherwise - in 3.6. It wasn't an issue in 3.4 and earlier because __mod__ wasn't implemented for bytestrings. -- nosy: +freakboy3742 ___

[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-26 Thread Fabio Sangiovanni
New submission from Fabio Sangiovanni: Originally posted by Russell Keith-Magee on Twitter: https://twitter.com/freakboy3742/status/812609675283681280 Reproduced successfully on Python 3.5.2 >>> x = bytearray(1) >>> y = {} >>> x % y Python3.5: bytearray(b'') Python3.6: bytearray(b'\x00') also: