mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-22 12:51:06 -05:00
Remove deprecated <ESP>Backend names
(Deprecated with warnings since v0.8)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import warnings
|
||||
from datetime import datetime
|
||||
|
||||
from ..exceptions import AnymailRequestsAPIError, AnymailError, AnymailDeprecationWarning
|
||||
from ..exceptions import AnymailRequestsAPIError, AnymailError
|
||||
from ..message import AnymailRecipientStatus
|
||||
from ..utils import get_anymail_setting, rfc2822date
|
||||
|
||||
@@ -57,15 +56,6 @@ class EmailBackend(AnymailRequestsBackend):
|
||||
return {recipient.email: status for recipient in payload.all_recipients}
|
||||
|
||||
|
||||
# Pre-v0.8 naming (deprecated)
|
||||
class MailgunBackend(EmailBackend):
|
||||
def __init__(self, **kwargs):
|
||||
warnings.warn(AnymailDeprecationWarning(
|
||||
"Please update your EMAIL_BACKEND setting to "
|
||||
"'anymail.backends.mailgun.EmailBackend'"))
|
||||
super(MailgunBackend, self).__init__(**kwargs)
|
||||
|
||||
|
||||
class MailgunPayload(RequestsPayload):
|
||||
|
||||
def __init__(self, message, defaults, backend, *args, **kwargs):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import warnings
|
||||
from datetime import datetime
|
||||
|
||||
from ..exceptions import AnymailRequestsAPIError, AnymailWarning, AnymailDeprecationWarning
|
||||
from ..exceptions import AnymailRequestsAPIError, AnymailWarning
|
||||
from ..message import AnymailRecipientStatus, ANYMAIL_STATUSES
|
||||
from ..utils import last, combine, get_anymail_setting
|
||||
|
||||
@@ -47,15 +47,6 @@ class EmailBackend(AnymailRequestsBackend):
|
||||
return recipient_status
|
||||
|
||||
|
||||
# Pre-v0.8 naming (deprecated)
|
||||
class MandrillBackend(EmailBackend):
|
||||
def __init__(self, **kwargs):
|
||||
warnings.warn(AnymailDeprecationWarning(
|
||||
"Please update your EMAIL_BACKEND setting to "
|
||||
"'anymail.backends.mandrill.EmailBackend'"))
|
||||
super(MandrillBackend, self).__init__(**kwargs)
|
||||
|
||||
|
||||
class DjrillDeprecationWarning(AnymailWarning, DeprecationWarning):
|
||||
"""Warning for features carried over from Djrill that will be removed soon"""
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import re
|
||||
import warnings
|
||||
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
from ..exceptions import AnymailRequestsAPIError, AnymailDeprecationWarning
|
||||
from ..exceptions import AnymailRequestsAPIError
|
||||
from ..message import AnymailRecipientStatus
|
||||
from ..utils import get_anymail_setting
|
||||
|
||||
@@ -95,15 +94,6 @@ class EmailBackend(AnymailRequestsBackend):
|
||||
return []
|
||||
|
||||
|
||||
# Pre-v0.8 naming (deprecated)
|
||||
class PostmarkBackend(EmailBackend):
|
||||
def __init__(self, **kwargs):
|
||||
warnings.warn(AnymailDeprecationWarning(
|
||||
"Please update your EMAIL_BACKEND setting to "
|
||||
"'anymail.backends.postmark.EmailBackend'"))
|
||||
super(PostmarkBackend, self).__init__(**kwargs)
|
||||
|
||||
|
||||
class PostmarkPayload(RequestsPayload):
|
||||
|
||||
def __init__(self, message, defaults, backend, *args, **kwargs):
|
||||
|
||||
@@ -5,7 +5,7 @@ from django.core.mail import make_msgid
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
from .base_requests import AnymailRequestsBackend, RequestsPayload
|
||||
from ..exceptions import AnymailConfigurationError, AnymailRequestsAPIError, AnymailWarning, AnymailDeprecationWarning
|
||||
from ..exceptions import AnymailConfigurationError, AnymailRequestsAPIError, AnymailWarning
|
||||
from ..message import AnymailRecipientStatus
|
||||
from ..utils import get_anymail_setting, timestamp, update_deep, parse_address_list
|
||||
|
||||
@@ -67,15 +67,6 @@ class EmailBackend(AnymailRequestsBackend):
|
||||
return {recipient.email: status for recipient in payload.all_recipients}
|
||||
|
||||
|
||||
# Pre-v0.8 naming (deprecated)
|
||||
class SendGridBackend(EmailBackend):
|
||||
def __init__(self, **kwargs):
|
||||
warnings.warn(AnymailDeprecationWarning(
|
||||
"Please update your EMAIL_BACKEND setting to "
|
||||
"'anymail.backends.sendgrid.EmailBackend'"))
|
||||
super(SendGridBackend, self).__init__(**kwargs)
|
||||
|
||||
|
||||
class SendGridPayload(RequestsPayload):
|
||||
|
||||
def __init__(self, message, defaults, backend, *args, **kwargs):
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
from __future__ import absolute_import # we want the sparkpost package, not our own module
|
||||
|
||||
import warnings
|
||||
|
||||
from .base import AnymailBaseBackend, BasePayload
|
||||
from ..exceptions import (AnymailAPIError, AnymailImproperlyInstalled,
|
||||
AnymailConfigurationError, AnymailDeprecationWarning)
|
||||
from ..exceptions import AnymailAPIError, AnymailImproperlyInstalled, AnymailConfigurationError
|
||||
from ..message import AnymailRecipientStatus
|
||||
from ..utils import get_anymail_setting
|
||||
|
||||
@@ -82,15 +79,6 @@ class EmailBackend(AnymailBaseBackend):
|
||||
return {recipient.email: recipient_status for recipient in payload.all_recipients}
|
||||
|
||||
|
||||
# Pre-v0.8 naming (deprecated)
|
||||
class SparkPostBackend(EmailBackend):
|
||||
def __init__(self, **kwargs):
|
||||
warnings.warn(AnymailDeprecationWarning(
|
||||
"Please update your EMAIL_BACKEND setting to "
|
||||
"'anymail.backends.sparkpost.EmailBackend'"))
|
||||
super(SparkPostBackend, self).__init__(**kwargs)
|
||||
|
||||
|
||||
class SparkPostPayload(BasePayload):
|
||||
def init_payload(self):
|
||||
self.params = {}
|
||||
|
||||
Reference in New Issue
Block a user