[issue38256] binascii.crc32 is not 64-bit clean

2019-09-23 Thread marko kreen
marko kreen added the comment: Found zlibmodule fix: https://bugs.python.org/issue10276 -- versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38

[issue38256] binascii.crc32 is not 64-bit clean

2019-09-23 Thread marko kreen
marko kreen added the comment: Looking at the code, the bug is dependant on USE_ZLIB_CRC32 define and it's unfixed in master. Cause is zlib crc32 that takes length as integer, zlibmodule has workaround, binascii has not. -- ___ Python tr

[issue38256] binascii.crc32 is not 64-bit clean

2019-09-23 Thread marko kreen
New submission from marko kreen : Following code: import binascii, zlib bigdata=memoryview(bytearray((1<<32) + 100)) print(binascii.crc32(bigdata)) crc = binascii.crc32(bigdata[:1000]) crc = binascii.crc32(bigdata[1000:], crc) print(crc) print(zlib.crc32(b

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-05 Thread marko kreen
marko kreen added the comment: Note additional brokenness in BOM addition: * It does add BOM even when msg is ascii, just because it was in unicode() string. * It does not add BOM to UTF8 string if it is already encoded to str(). So highly doubt anybody actually relies on it. And keeping

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-05 Thread marko kreen
marko kreen added the comment: The 'msg' in SysLogHandler does not correspond to MSG in RFC. Nor to %(message)s in log record. RFC: SYSLOG-MSG = HEADER SP STRUCTURED-DATA [SP MSG] HEADER = PRI VERSION SP TIMESTAMP SP HOSTNAME S

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-03-30 Thread marko kreen
Changes by marko kreen : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue14452> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-03-30 Thread marko kreen
New submission from marko kreen : SysLogHandler converts message to utf8 and adds BOM, supposedly to conform with RFC5424, but the implementation is broken: the RFC specifies that the BOM should prefix only unstructured message part, but current Python implementation puts it in the middle of

[issue12031] subprocess module does not accept file twice

2011-05-08 Thread marko kreen
New submission from marko kreen : I want to pass /dev/null as stdin and stderr. This works from python 2.4 .. 3.2a3 It fails in final 3.2 with 'Bad file descriptor': Traceback (most recent call last): File "test.py", line 11, in Popen(['cat', 'fil