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

Remove Django 4.0 deprecation warnings #145

Closed freddez closed 2 years ago

freddez commented 3 years ago

Hi, I've switched my application to latest Django LTS version, and I have warnings about deprecated signal arguments.

nezhar commented 3 years ago

The library is running tests also against Django 3.2, so there should be no direct issue.

Can you provide some details about the deprecation warnings you receive? We should cover this for future releases :wink:

freddez commented 3 years ago

Sure :

/home/fredz/venv/pash/lib/python3.9/site-packages/django_rest_passwordreset/signals.py:9: RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
  reset_password_token_created = django.dispatch.Signal(
/home/fredz/venv/pash/lib/python3.9/site-packages/django_rest_passwordreset/signals.py:13: RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
  pre_password_reset = django.dispatch.Signal(providing_args=["user"])
/home/fredz/venv/pash/lib/python3.9/site-packages/django_rest_passwordreset/signals.py:15: RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
  post_password_reset = django.dispatch.Signal(providing_args=["user"])
/home/fredz/venv/pash/lib/python3.9/site-packages/django_rest_passwordreset/urls.py:9: RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
  url(r'^validate_token/', reset_password_validate_token, name="reset-password-validate"),
/home/fredz/venv/pash/lib/python3.9/site-packages/django_rest_passwordreset/urls.py:10: RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
  url(r'^confirm/', reset_password_confirm, name="reset-password-confirm"),
/home/fredz/venv/pash/lib/python3.9/site-packages/django_rest_passwordreset/urls.py:11: RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
  url(r'^', reset_password_request_token, name="reset-password-request"),

(Django 3.2.6)

nezhar commented 3 years ago

Thanks :+1:

You should have no Issue as all the deprecations are related to the next major Django release :wink:

freddez commented 3 years ago

Yes, I'm annoyed this that warnings when I launch the runserver, but I think I can survive :)

The url deprecation warning is straightforward to fix, but I don't know what yo do with the signals.

On Fri, Aug 20, 2021 at 1:12 PM Harald Nezbeda @.***> wrote:

Thanks 👍

You should have no Issue as all the deprecations are related to the next major Django release 😉

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/anexia-it/django-rest-passwordreset/issues/145#issuecomment-902617130, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHR7XQMQNCTJXKL6DE7EYTT5Y2BLANCNFSM5CH47LTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Frédéric De Zorzi

nezhar commented 2 years ago

Should be fixed in 1.3.0