mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
- Rename `anymail.backends.amazon_sesv2.EmailBackend` to `amazon_ses`, making SES v2 the default. - Rename the old `amazon_ses` backend to `amazon_sesv1`, keeping it available. Add a deprecation warning. - Alias `amazon_sesv2` to `amazon_ses`, with a deprecation warning (for projects that opted into v2 early under Anymail 9.1 or 9.2). - Similar renaming on the test files. - Update docs to assume v2 in most places (other than migration-specific sections)
15 lines
469 B
Python
15 lines
469 B
Python
import warnings
|
|
|
|
from ..exceptions import AnymailDeprecationWarning
|
|
from .amazon_ses import EmailBackend as AmazonSESV2EmailBackend
|
|
|
|
|
|
class EmailBackend(AmazonSESV2EmailBackend):
|
|
def __init__(self, **kwargs):
|
|
warnings.warn(
|
|
"Anymail now uses Amazon SES v2 by default. Please change"
|
|
" 'amazon_sesv2' to 'amazon_ses' in your EMAIL_BACKEND setting.",
|
|
AnymailDeprecationWarning,
|
|
)
|
|
super().__init__(**kwargs)
|