Skip to content

Built-in modules inconsistent in different systems. #132834

Closed as not planned
Closed as not planned
@kylincodelab

Description

@kylincodelab

Bug report

Bug description:

import zlib

def zip(e):
    if isinstance(e, str):
        e = e.encode('utf-8')
    return zlib.compress(e, zlib.Z_DEFAULT_COMPRESSION, zlib.MAX_WBITS | 16)

name = 'hello kycode'
res = zip(name)
result = [x for x in res]
print(result)

The zlib module yields inconsistent results across different systems.

ubuntu 24

[31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 203, 72, 205, 201, 201, 87, 200, 174, 76, 206, 79, 73, 5, 0, 133, 105, 82, 3, 12, 0, 0, 0]

win 10 arm

[31, 139, 8, 0, 0, 0, 0, 0, 0, 10, 203, 72, 205, 201, 201, 87, 200, 174, 76, 206, 79, 73, 5, 0, 133, 105, 82, 3, 12, 0, 0, 0]

CPython versions tested on:

3.11

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions