Skip to content

Commit

Permalink
Use importerror for b62_decode and avoid deprecation notification (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
GDay committed Oct 26, 2023
1 parent 5031272 commit b3f4945
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django_q/core_signing.py
Expand Up @@ -8,11 +8,12 @@
from django.core.signing import TimestampSigner as TsS
from django.core.signing import b64_decode, dumps

if django.VERSION < (5, 0):
try:
from django.core.signing import b62_decode
except ImportError:
# fallback for django 3.x
from django.utils.baseconv import base62
b62_decode = base62.decode
else:
from django.core.signing import b62_decode

from django.utils.crypto import constant_time_compare
from django.utils.encoding import force_bytes, force_str
Expand Down

0 comments on commit b3f4945

Please sign in to comment.