[issue22341] Python 3 crc32 documentation clarifications

2015-12-10 Thread Martin Panter
Martin Panter added the comment: Thanks for the reviews -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ __

[issue22341] Python 3 crc32 documentation clarifications

2015-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 03c4ca1a34e2 by Martin Panter in branch '3.5': Issue #22341: Drop Python 2 workaround and document CRC initial value https://hg.python.org/cpython/rev/03c4ca1a34e2 New changeset 360c1326d8d1 by Martin Panter in branch 'default': Issue #22341: Merge

[issue22341] Python 3 crc32 documentation clarifications

2015-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, thank you Martin. -- assignee: docs@python -> martin.panter stage: patch review -> commit review ___ Python tracker ___ _

[issue22341] Python 3 crc32 documentation clarifications

2015-12-08 Thread Martin Panter
Martin Panter added the comment: In crc-sign.v5.patch I have changed the binascii.crc_hqx() and crc32() documentation to use “value”, matching the zlib documentation. Is that what you had in mind? -- stage: -> patch review versions: +Python 3.6 Added file: http://bugs.python.org/file4

[issue22341] Python 3 crc32 documentation clarifications

2015-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM. But while we are here, wouldn't be worth to unify the name of second parameter of binascii and zlib CRC calculation functions? And unify the description of crc_hqx() with other functions. -- ___ P

[issue22341] Python 3 crc32 documentation clarifications

2015-03-30 Thread Martin Panter
Martin Panter added the comment: V4 fixes a merge conflict with recent gzip changes. -- Added file: http://bugs.python.org/file38739/crc-sign.v4.patch ___ Python tracker ___

[issue22341] Python 3 crc32 documentation clarifications

2015-03-30 Thread Martin Panter
Martin Panter added the comment: Patch v3: * Reverted to original crc32(b"hello") example call with the implicit initial CRC * Added “Changed in version 3.0” notices, restoring a brief version of the suggestion to use the bit mask, along with an explanation. Python 2 compatibility information

[issue22341] Python 3 crc32 documentation clarifications

2015-03-20 Thread Martin Panter
Martin Panter added the comment: Hi Gregory, I think the three functions have been fixed since Python 3.0. It looks like you changed them in revisions 6a7fa8421902 (zlib module) and 132cf3a79126 (crc32 functions). Looking at the 3.0 branch, all three functions use PyLong_FromUnsignedLong(), bu

[issue22341] Python 3 crc32 documentation clarifications

2015-03-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: I do not object to the removal of the & 0xfff from the stdlib library code if these functions have actually been fixed to always return unsigned now. (double check the behavior, and if good, just do it!) But I think the docs should still mention that th

[issue22341] Python 3 crc32 documentation clarifications

2015-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue4903. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue22341] Python 3 crc32 documentation clarifications

2015-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These notes was added by Gregory in r68535. Ask him if they still are needed. -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue22341] Python 3 crc32 documentation clarifications

2015-03-08 Thread Martin Panter
Martin Panter added the comment: Posting a new patch that also removes the masking from the gzip, zipfile, tarfile, and test_zlib modules. I removed the comment about signedness in tarfile; let me know if you saw any others. -- versions: +Python 3.5 -Python 3.4 Added file: http://bugs.

[issue22341] Python 3 crc32 documentation clarifications

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: crc & 0x is still used in gzip, zipfile and tarfile. And some comments say about signess of 32-bit checksums. -- nosy: +serhiy.storchaka ___ Python tracker _

[issue22341] Python 3 crc32 documentation clarifications

2014-12-18 Thread Martin Panter
Martin Panter added the comment: Here is a patch that fixes the binascii, zlib.crc32() and adler32() documentation as I suggested. I’m still interested why there are two ways to do a CRC-32, each equally non-obvious as the other. -- keywords: +patch Added file: http://bugs.python.org/

[issue22341] Python 3 crc32 documentation clarifications

2014-09-05 Thread Martin Panter
New submission from Martin Panter: This is regarding the Python 3 documentation for binascii.crc32(), . It repeatedly recommends correcting the sign by doing crc32() & 0x, but it is not immediately clear why. Only after