[issue47040] Remove invalid versionchanged in doc

Ma Lin report at bugs.python.org
Thu Mar 17 03:01:08 EDT 2022


Ma Lin <malincns at 163.com> added the comment:

`binascii.crc32` doc also has this invalid document:
doc: https://docs.python.org/3/library/binascii.html#binascii.crc32
3.0.0 code: https://github.com/python/cpython/blob/v3.0/Modules/binascii.c#L1035

In addition, `binascii.crc32` has an `USE_ZLIB_CRC32` code path, but it's buggy.
The length of zlib `crc32()` function is `unsigned int`, so if use `USE_ZLIB_CRC32` code path and the data > 4GiB, the result is wrong.
Should we remove `USE_ZLIB_CRC32` code path in `binascii.c`, or fix it?

`USE_ZLIB_CRC32` code path in binascii.c (bug code): 
https://github.com/python/cpython/blob/v3.11.0a6/Modules/binascii.c#L756-L767
crc32 in zlibmodule.c, it uses an UINT_MAX sliding window (right code):
 https://github.com/python/cpython/blob/v3.11.0a6/Modules/zlibmodule.c#L1436

----------
title: Remove an invalid versionchanged in doc -> Remove invalid versionchanged in doc

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47040>
_______________________________________


More information about the Python-bugs-list mailing list