pmclanahan / django-celery-email

A Django email backend that uses a celery task for sending the email.
BSD 3-Clause "New" or "Revised" License
477 stars 110 forks source link

Import under Django 3.0 fails #67

Closed peterthomassen closed 4 years ago

peterthomassen commented 4 years ago

The Python 2 compatibility APIs are removed with the Django 3.0 release. Importing from djcelery_email.utils thus leads to ImportError: cannot import name 'six' from 'django.utils'.

philippbosch commented 4 years ago

66 already addresses this and was merged into master just now.

peterthomassen commented 4 years ago

thanks!

JaredOzzy commented 4 years ago

I've upgraded my django, celery and dj-celery to the latest versions and im getting the issue

ImportError: cannot import name 'six'

File "/usr/local/lib/python3.6/site-packages/djcelery_email/backends.py", line 4, in django_1 | from djcelery_email.tasks import send_emails django_1 | File "/usr/local/lib/python3.6/site-packages/djcelery_email/tasks.py", line 7, in django_1 | import djcelery_email.conf # noqa django_1 | File "/usr/local/lib/python3.6/site-packages/djcelery_email/conf.py", line 1, in django_1 | from appconf import AppConf django_1 | File "/usr/local/lib/python3.6/site-packages/appconf/init.py", line 2, in django_1 | from .base import AppConf # noqa django_1 | File "/usr/local/lib/python3.6/site-packages/appconf/base.py", line 4, in django_1 | from django.utils import six django_1 | ImportError: cannot import name 'six'

philippbosch commented 4 years ago

File "/usr/local/lib/python3.6/site-packages/appconf/base.py", line 4, in from django.utils import six

@JaredOzzy this is due to an import in django-appconf, not django-celery-email

JaredOzzy commented 4 years ago

Ah you are correct, just saw that.

Thank you sir!