anexia-it / django-rest-passwordreset

An extension of django rest framework, providing a configurable password reset strategy
BSD 3-Clause "New" or "Revised" License
419 stars 148 forks source link

Is django-rest-passwordreset safe to use on django 3.*.* #109

Closed yibizzi closed 4 years ago

yibizzi commented 4 years ago

If not, are there any alternatives?

rnegron commented 4 years ago

If you try to use it, the following exception will occur:

File "/usr/local/lib/python3.7/site-packages/django_rest_passwordreset/models.py", line 3, in <module>
    from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (/usr/local/lib/python3.7/site-packages/django/utils/encoding.py

This is because Django 3.0 removed Python 2 compatability. So no, this package is not safe to use on Django 3.0

EDIT: Found this PR which removed the deprecated method: https://github.com/anexia-it/django-rest-passwordreset/pull/76. I'm re-installing the latest release (1.0.0) to see if it was an issue with an faulty update.

EDIT 2: OK! The latest version on PyPI is actually 1.1.0, it's just that the latest release tag here on GitHub is still 1.0.0. Anyway, installing the latest version doesn't throw that error :)

anx-cbenke commented 4 years ago

Coincidentally, I've just been working on the version update these days. We'll update the compatibility matrix shortly! And yes, Django 3.x will work fine and safe, you just need to use Django Rest Framework 3.1x!

yibizzi commented 4 years ago

Great. Thanks mates. I'll close the issue.