Skip to content

Commit

Permalink
Replace dependency with one more well-maintained and already included
Browse files Browse the repository at this point in the history
  • Loading branch information
bjester committed May 4, 2023
1 parent ba6a82c commit 4ce10b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions contentcuration/contentcuration/utils/secretmanagement.py
Expand Up @@ -3,9 +3,9 @@
import os

import six
from crcmod.predefined import mkPredefinedCrcFun
from google.cloud import kms
from google.cloud.storage import Client
from google_crc32c import value as _crc32c

ENV_VARS = "ENV_VARS"
KMS_GCS = 2
Expand Down Expand Up @@ -127,5 +127,4 @@ def crc32c(data):
Returns:
An int representing the CRC32C checksum of the provided bytes.
"""
crc32c_fun = mkPredefinedCrcFun('crc-32c')
return crc32c_fun(six.ensure_binary(data))
return _crc32c(six.ensure_binary(data))
2 changes: 1 addition & 1 deletion requirements.in
Expand Up @@ -26,6 +26,7 @@ django-db-readonly==0.7.0
oauth2client
django-mathfilters
google-cloud-kms==2.0.0
google-crc32c==1.1.2
backoff
backports-abc==0.5
django-model-utils==4.3.1
Expand All @@ -40,4 +41,3 @@ python-dateutil>=2.8.1
jsonschema>=3.2.0
importlib-metadata==1.7.0
django-celery-results
crcmod==1.7
6 changes: 3 additions & 3 deletions requirements.txt
Expand Up @@ -54,8 +54,6 @@ click-repl==0.2.0
# via celery
confusable-homoglyphs==3.2.0
# via django-registration
crcmod==1.7
# via -r requirements.in
django==3.2.18
# via
# -r requirements.in
Expand Down Expand Up @@ -130,7 +128,9 @@ google-cloud-logging==2.3.1
google-cloud-storage==1.41.1
# via -r requirements.in
google-crc32c==1.1.2
# via google-resumable-media
# via
# -r requirements.in
# google-resumable-media
google-resumable-media==1.3.0
# via google-cloud-storage
googleapis-common-protos[grpc]==1.57.0
Expand Down

0 comments on commit 4ce10b3

Please sign in to comment.