anexia / drf-multitokenauth

An extension to Django-Rest-Frameworks Token Authentication, enabling a user to have multiple authorization tokens
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

Incompatible with Django 3.0 #7

Closed nezhar closed 3 years ago

nezhar commented 4 years ago
File "/home/nezhar/DEV/python/snypy-backend/venv/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/nezhar/DEV/python/snypy-backend/venv/lib/python3.7/site-packages/django_rest_multitokenauth/models.py", line 7, in <module>
    from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (/home/nezhar/DEV/python/snypy-backend/venv/lib/python3.7/site-packages/django/utils/encoding.py)

This is due to deprecation of some Python 2 compatibility APIs: https://docs.djangoproject.com/en/3.0/releases/3.0/#removed-private-python-2-compatibility-apis