Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Python3 pure python import fails due to erroneous warning.warn args #35

@andrewsg

Description

@andrewsg

I received this error in my python-storage system test, testing for crc32c fallback to pure python on python 3, which suggests that the warnings.warn() arguments are transposed in init.py.

    import warnings
    
    _SLOW_CRC32C_WARNING = (
        "As the c extension couldn't be imported, `google-crc32c` is using a "
        "pure python implementation that is significantly slower. If possible, "
        "please configure a c build environment and compile the extension"
    )
    
    # If available, default to CFFI Implementation, otherwise, use pure python.
    try:
        from crc32c import cffi as _crc32c
        implementation = "cffi"
    except ImportError:
        from crc32c import python as _crc32c
>       warnings.warn(RuntimeWarning, "_SLOW_CRC32C_WARNING",)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions