Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix confusing versionchanged note in crc32 and adler32 #91196

Closed
animalize mannequin opened this issue Mar 17, 2022 · 8 comments
Closed

Fix confusing versionchanged note in crc32 and adler32 #91196

animalize mannequin opened this issue Mar 17, 2022 · 8 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir stdlib Python modules in the Lib dir

Comments

@animalize
Copy link
Mannequin

animalize mannequin commented Mar 17, 2022

BPO 47040
Nosy @gpshead, @animalize, @miss-islington
PRs
  • bpo-47040: improve document of checksum functions #31955
  • [3.10] bpo-47040: improve document of checksum functions (GH-31955) #32002
  • [3.9] [3.10] bpo-47040: improve document of checksum functions (GH-31955) (GH-32002) #32004
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gpshead'
    closed_at = <Date 2022-03-19.23:08:03.511>
    created_at = <Date 2022-03-17.05:35:08.673>
    labels = ['3.11', 'library', '3.9', '3.10', 'docs']
    title = 'Fix confusing versionchanged note in crc32 and adler32'
    updated_at = <Date 2022-03-20.07:21:41.731>
    user = 'https://github.com/animalize'

    bugs.python.org fields:

    activity = <Date 2022-03-20.07:21:41.731>
    actor = 'miss-islington'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2022-03-19.23:08:03.511>
    closer = 'gregory.p.smith'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2022-03-17.05:35:08.673>
    creator = 'malin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47040
    keywords = ['patch']
    message_count = 8.0
    messages = ['415386', '415389', '415574', '415582', '415583', '415592', '415594', '415595']
    nosy_count = 4.0
    nosy_names = ['gregory.p.smith', 'docs@python', 'malin', 'miss-islington']
    pr_nums = ['31955', '32002', '32004']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue47040'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @animalize
    Copy link
    Mannequin Author

    animalize mannequin commented Mar 17, 2022

    @animalize animalize mannequin assigned docspython Mar 17, 2022
    @animalize animalize mannequin added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Mar 17, 2022
    @animalize animalize mannequin assigned docspython Mar 17, 2022
    @animalize animalize mannequin added docs Documentation in the Doc dir 3.9 only security fixes stdlib Python modules in the Lib dir 3.10 only security fixes 3.11 only security fixes labels Mar 17, 2022
    @animalize
    Copy link
    Mannequin Author

    animalize mannequin commented Mar 17, 2022

    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

    @animalize animalize mannequin changed the title Remove an invalid versionchanged in doc Remove invalid versionchanged in doc Mar 17, 2022
    @animalize animalize mannequin changed the title Remove an invalid versionchanged in doc Remove invalid versionchanged in doc Mar 17, 2022
    @gpshead
    Copy link
    Member

    gpshead commented Mar 19, 2022

    New changeset b3f2d4c by Ma Lin in branch 'main':
    bpo-47040: improve document of checksum functions (gh-31955)
    b3f2d4c

    @gpshead gpshead changed the title Remove invalid versionchanged in doc Fix confusing versionchanged note in crc32 and adler32 Mar 19, 2022
    @gpshead gpshead changed the title Remove invalid versionchanged in doc Fix confusing versionchanged note in crc32 and adler32 Mar 19, 2022
    @gpshead
    Copy link
    Member

    gpshead commented Mar 19, 2022

    FYI - https://bugs.python.org/issue38256 covers the 32-bit bug.

    @gpshead
    Copy link
    Member

    gpshead commented Mar 19, 2022

    If you want to backport the documentation updates, feel free to make PRs for that.

    @gpshead gpshead closed this as completed Mar 19, 2022
    @gpshead gpshead assigned gpshead and unassigned docspython Mar 19, 2022
    @gpshead gpshead closed this as completed Mar 19, 2022
    @gpshead gpshead assigned gpshead and unassigned docspython Mar 19, 2022
    @animalize
    Copy link
    Mannequin Author

    animalize mannequin commented Mar 20, 2022

    PR 32002 is for 3.10/3.9 branches.

    @gpshead
    Copy link
    Member

    gpshead commented Mar 20, 2022

    New changeset 6d290d5 by Ma Lin in branch '3.10':
    [3.10] bpo-47040: improve document of checksum functions (GH-31955) (GH-32002)
    6d290d5

    @miss-islington
    Copy link
    Contributor

    New changeset 73f4b47 by Miss Islington (bot) in branch '3.9':
    [3.10] bpo-47040: improve document of checksum functions (GH-31955) (GH-32002)
    73f4b47

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants