sklarsa / django-sendgrid-v5

An implementation of Django's EmailBackend compatible with sendgrid-python v5+
MIT License
318 stars 54 forks source link

TypeError: __init__() got an unexpected keyword argument 'providing_args' #128

Open halilkabaca opened 1 month ago

halilkabaca commented 1 month ago

If you are getting this error, it is because Django 4 seems to have removed this argument.

Changing the line on /sendgrid_backend/signals.py

from: sendgrid_email_sent = django.dispatch.Signal(providing_args=["message", "fail_flag"])

to: sendgrid_email_sent = django.dispatch.Signal()

fixes the problem for me.

My Environment: Python3 version: 3.8.10 Django version: 4.1.8

sklarsa commented 1 month ago

Thanks for reporting the issue! Do you mind making a PR to fix this? With a feature flag for the Django version?

halilkabaca commented 1 month ago

I must have been using an old version because I see it's already done in master long time ago. However, I had installed it using pip install django-sendgrid-v5 could that be still old somehow?

sklarsa commented 1 month ago

Looks like version 1.2.3 is released to PyPi and should have all relevant commits from master