Django-Verify-Email is not compatible anymore with Django 5.1
Moving from Django 5.0.8 to 5.1 triggers the following exception:
File "/home/olivi/devt/cousins-matter/members/views/views_registration.py", line 76, in post
send_verification_email(request, form)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/olivi/miniconda3/envs/cousinsmatter/lib/python3.12/site-packages/verify_email/email_handler.py", line 98, in send_verification_email
return _VerifyEmail().send_verification_link(request, form)
^^^^^^^^^^^^^^
File "/home/olivi/miniconda3/envs/cousinsmatter/lib/python3.12/site-packages/verify_email/email_handler.py", line 19, in __init__
self.token_manager = TokenManager()
^^^^^^^^^^^^^^
File "/home/olivi/miniconda3/envs/cousinsmatter/lib/python3.12/site-packages/verify_email/token_manager.py", line 53, in __init__
super().__init__(key, sep, salt)
TypeError: Signer.__init__() takes 1 positional argument but 4 were given
Unfortunately, I'm not sure this project is still maintained...
Looking at the code, Django-Verify-Email defines a class TokenManager which derives from django.core.signing.TimestampSigner which itself derives from django.core.signing.Signer and this Signer class contains the following comment:
class Signer:
# RemovedInDjango51Warning: When the deprecation ends, replace with:
# def __init__(
# self, *, key=None, sep=":", salt=None, algorithm=None, fallback_keys=None
# ):
def __init__(
self,
*args,
key=None,
sep=":",
salt=None,
algorithm=None,
fallback_keys=None,
):
So I suppose we can change the faulty line super().init(key, sep, salt) by super().init(key=key, sep=sep, salt=salt)
closed with PR https://github.com/foo290/Django-Verify-Email/pull/88
yea, saw it, fixed it btw, but thanks a lot for this, its been a while since I worked on this package