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

OSX runs have crc32c slow warning #234

Closed
jonathanzxu opened this issue Sep 6, 2024 · 2 comments · Fixed by #244
Closed

OSX runs have crc32c slow warning #234

jonathanzxu opened this issue Sep 6, 2024 · 2 comments · Fixed by #244

Comments

@jonathanzxu
Copy link
Contributor

Runs on Mac display the following warning on startup:

/Users/jonathan.x/Documents/code/VSB/.venv/lib/python3.12/site-packages/google_crc32c/__init__.py:29: RuntimeWarning: 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
  warnings.warn(_SLOW_CRC32C_WARNING, RuntimeWarning)
@daverigby
Copy link
Collaborator

I looked into this briefly a while ago. It’s an issue with google_crc32c package, the need to rebuild some native code for Python 3.12 (and up?) but haven’t yet. I think there’s an upstream bug tracking - could you find it and link here please?

For short-term mitigation we could update install instructions etc to suggest Python 3.11 which doesn’t have the problem.

@jonathanzxu
Copy link
Contributor Author

googleapis/python-crc32c#178 seems to be the issue (I guess they did release 3.12 a day or two ago?).

daverigby added a commit that referenced this issue Sep 20, 2024
This adds proper support for Python 3.12, which fixes the following
warning previously seen:

    .venv/lib/python3.12/site-packages/google_crc32c/__init__.py:29: RuntimeWarning: 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
      warnings.warn(_SLOW_CRC32C_WARNING, RuntimeWarning)

Fixes #234.
daverigby added a commit that referenced this issue Sep 20, 2024
This adds proper support for Python 3.12, which fixes the following
warning previously seen:

    .venv/lib/python3.12/site-packages/google_crc32c/__init__.py:29: RuntimeWarning: 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
      warnings.warn(_SLOW_CRC32C_WARNING, RuntimeWarning)

Fixes #234.
daverigby added a commit that referenced this issue Sep 20, 2024
## Problem

This adds proper support for Python 3.12, which fixes the following
warning previously seen:

.venv/lib/python3.12/site-packages/google_crc32c/__init__.py:29:
RuntimeWarning: 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
      warnings.warn(_SLOW_CRC32C_WARNING, RuntimeWarning)

Fixes #234.

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants