Skip to content

Commit

Permalink
Merge pull request #2 from Nestio/py3_compatible
Browse files Browse the repository at this point in the history
Replace `smart_str` by `smart_bytes` in order to be compatible with python 3
  • Loading branch information
Yukilas authored Dec 9, 2021
2 parents def5b5d + ece300f commit 05829b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions auth_remember/auth_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Taken from django-dev (should be standard in django 1.4)"""
import hashlib
from django.utils.encoding import smart_str
from django.utils.encoding import smart_bytes
from django.utils.crypto import constant_time_compare

UNUSABLE_PASSWORD = '!' # This will never be a valid hash
Expand All @@ -10,7 +10,7 @@ def get_hexdigest(algorithm, salt, raw_password):
Returns a string of the hexdigest of the given plaintext password and salt
using the given algorithm ('md5', 'sha1' or 'crypt').
"""
raw_password, salt = smart_str(raw_password), smart_str(salt)
raw_password, salt = smart_bytes(raw_password), smart_bytes(salt)
if algorithm == 'crypt':
try:
import crypt
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def finalize_options(self):

setup(
name='django-auth-remember',
version='0.5',
version='0.6',
url='https://github.com/ailabs/django-auth-remember/',
license='MIT',
author='Michael van Tellingen',
Expand Down

0 comments on commit 05829b6

Please # to comment.