Skip to content

Commit

Permalink
Remove unnecessary six usage. Address Django 5.0 breaking change. F…
Browse files Browse the repository at this point in the history
…ixes #36. (#37)

Co-authored-by: James Addison <[email protected]>
  • Loading branch information
jaddison and james-certn committed Nov 2, 2023
1 parent 1b3687c commit bfb2e61
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ninja_jwt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@

from django.conf import settings
from django.utils.functional import lazy
from django.utils.timezone import is_naive, make_aware, utc
from six import string_types
from django.utils.timezone import is_naive, make_aware

from ninja_jwt import exceptions

try:
from datetime.timezone import utc
except ImportError:
from django.utils.timezone import utc


logger = logging.getLogger("django")


Expand All @@ -32,7 +37,7 @@ def import_callable(path_or_callable):
if callable(path_or_callable):
return path_or_callable
else:
assert isinstance(path_or_callable, string_types)
assert isinstance(path_or_callable, str)
package, attr = path_or_callable.rsplit(".", 1)
packages = import_module(package)
return getattr(packages, attr)
Expand Down

0 comments on commit bfb2e61

Please sign in to comment.