Styria-Digital / django-rest-framework-jwt

JSON Web Token Authentication support for Django REST Framework
https://styria-digital.github.io/django-rest-framework-jwt/
MIT License
191 stars 57 forks source link

Tests fail due to missing `django.utils.six` #87

Closed palfrey closed 3 years ago

palfrey commented 3 years ago
______________ ERROR collecting tests/test_management_commands.py ______________
ImportError while importing test module '/home/travis/build/Styria-Digital/django-rest-framework-jwt/tests/test_management_commands.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py36-dj30-drf311-codecov/lib/python3.6/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_management_commands.py:7: in <module>
    from django.utils.six import StringIO
E   ModuleNotFoundError: No module named 'django.utils.six'

This got removed in Django 3.0 and should be replaced with six. See also https://stackoverflow.com/a/59252857/320546

dominik-bln commented 3 years ago

Maybe consider dropping support for Python 2.7 instead? That should make it possible to remove any six dependencies.

palfrey commented 3 years ago

2.7 dropping is an option, but https://github.com/Styria-Digital/django-rest-framework-jwt/pull/90 just adds six to the test deps fixing this.