Skip to content

Comments

Update django-anymail to 12.0#239

Open
pyup-bot wants to merge 1 commit intodevelfrom
pyup-update-django-anymail-8.0-to-12.0
Open

Update django-anymail to 12.0#239
pyup-bot wants to merge 1 commit intodevelfrom
pyup-update-django-anymail-8.0-to-12.0

Conversation

@pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Sep 9, 2024

This PR updates django-anymail[amazon_ses] from 8.0 to 12.0.

Changelog

12.0

-----

*2024-09-09*

Breaking changes
~~~~~~~~~~~~~~~~

* Require **Django 4.0 or later** and Python 3.8 or later.

Features
~~~~~~~~

* **Resend:** Add support for ``send_at``.

Fixes
~~~~~

* **Unisender Go:** Fix several problems in Anymail's Unisender Go status tracking
webhook. Rework signature checking to fix false validation errors (particularly
on "clicked" and "opened" events). Properly handle "use single event" webhook
option. Correctly verify WEBHOOK_SECRET when set. Provide Unisender Go's
``delivery_status`` code and unsubscribe form ``comment`` in Anymail's
``event.description``. Treat soft bounces as "deferred" rather than "bounced".
(Thanks to `MikeVL`_ for fixing the signature validation problem.)

Other
~~~~~

* **Mandrill (docs):** Explain how ``cc`` and ``bcc`` handling depends on
Mandrill's "preserve recipients" option. (Thanks to `dgilmanAIDENTIFIED`_
for reporting the issue.)

* **Postal (docs):** Update links to Postal's new documentation site.
(Thanks to `jmduke`_.)

11.1

-----

*2024-08-07*

Features
~~~~~~~~

* **Brevo:** Support Brevo's new "Complaint," "Error" and "Loaded by proxy"
tracking events. (Thanks to `originell`_ for the update.)

Deprecations
~~~~~~~~~~~~

* This will be the last Anymail release to support Django 3.0, 3.1 and 3.2
(which reached end of extended support on 2021-04-06, 2021-12-07 and
2024-04-01, respectively).

* This will be the last Anymail release to support Python 3.7 (which reached
end-of-life on 2023-06-27, and is not supported by Django 4.0 or later).

11.0.1

-------

*2024-07-11*

(This release updates only documentation and package metadata; the code is
identical to v11.0.)

Fixes
~~~~~

* **Amazon SES (docs):** Correct IAM policies required for using
the Amazon SES v2 API. See
`Migrating to the SES v2 API <https://anymail.dev/en/stable/esps/amazon_ses/#amazon-ses-v2>`__.
(Thanks to `scur-iolus`_ for identifying the problem.)

11.0

-----

*2024-06-23*

Breaking changes
~~~~~~~~~~~~~~~~

* **Amazon SES:** Drop support for the Amazon SES v1 API.
If your ``EMAIL_BACKEND`` setting uses ``amazon_sesv1``,
or if you are upgrading from Anymail 9.x or earlier directly to 11.0 or later, see
`Migrating to the SES v2 API <https://anymail.dev/en/stable/esps/amazon_ses/#amazon-ses-v2>`__.
(Anymail 10.0 switched to the SES v2 API by default. If your ``EMAIL_BACKEND``
setting has ``amazon_sesv2``, change that to just ``amazon_ses``.)

* **SparkPost:** When sending with a ``template_id``, Anymail now raises an
error if the message uses features that SparkPost will silently ignore. See
`docs <https://anymail.dev/en/stable/esps/sparkpost/#sparkpost-template-limitations>`__.

Features
~~~~~~~~

* Add new ``merge_headers`` option for per-recipient headers with batch sends.
This can be helpful to send individual *List-Unsubscribe* headers (for example).
Supported for all current ESPs *except* MailerSend, Mandrill and Postal. See
`docs <https://anymail.dev/en/stable/sending/anymail_additions/#anymail.message.AnymailMessage.merge_headers>`__.
(Thanks to `carrerasrodrigo`_ for the idea, and for the base and
Amazon SES implementations.)

* **Amazon SES:** Allow extra headers, ``metadata``, ``merge_metadata``,
and ``tags`` when sending with a ``template_id``.
(Requires boto3 v1.34.98 or later.)

* **MailerSend:** Allow all extra headers. (Note that MailerSend limits use
of this feature to "Enterprise accounts only.")

Fixes
~~~~~

* **Amazon SES:** Fix a bug that could result in sending a broken address header
if it had a long display name containing both non-ASCII characters and commas.
(Thanks to `andresmrm`_ for isolating and reporting the issue.)

* **SendGrid:** In the tracking webhook, correctly report "bounced address"
(recipients dropped due to earlier bounces) as reject reason ``"bounced"``.
(Thanks to `vitaliyf`_.)

10.3

-----

*2024-03-12*

Features
~~~~~~~~

* **Brevo:** Add support for batch sending
(`docs <https://anymail.dev/en/stable/esps/brevo/#batch-sending-merge-and-esp-templates>`__).

* **Resend:** Add support for batch sending
(`docs <https://anymail.dev/en/stable/esps/resend/#batch-sending-merge-and-esp-templates>`__).

* **Unisender Go:** Newly supported ESP
(`docs <https://anymail.dev/en/stable/esps/unisender_go/>`__).
(Thanks to `Arondit`_ for the implementation.)


Fixes
~~~~~

* **Mailgun:** Avoid an error when Mailgun posts null delivery-status
to the event tracking webhook. (Thanks to `izimobil`_ for the fix.)


Deprecations
~~~~~~~~~~~~

* **Brevo (SendinBlue):** Rename "SendinBlue" to "Brevo" throughout
Anymail's code, reflecting their rebranding.
This affects the email backend path, settings names, and webhook URLs.
The old names will continue to work for now, but are deprecated. See
`Updating code from SendinBlue to Brevo <https://anymail.dev/en/stable/esps/brevo/#brevo-rename>`__
for details.

10.2

-----

*2023-10-25*

Features
~~~~~~~~

* **Resend**: Add support for this ESP
(`docs <https://anymail.dev/en/stable/esps/resend/>`__).

Fixes
~~~~~

* Correctly merge global ``SEND_DEFAULTS`` with message ``esp_extra``
for ESP APIs that use a nested structure (including Mandrill and SparkPost).
Clarify intent of global defaults merging code for other message properties.
(Thanks to `mounirmesselmeni`_ for reporting the issue.)

Other
~~~~~

* **Mailgun (docs):** Clarify account-level "Mailgun API keys" vs.
domain-level "sending API keys." (Thanks to `sdarwin`_ for
reporting the issue.)
* Test against prerelease versions of Django 5.0 and Python 3.12.

10.1

-----

*2023-07-31*

Features
~~~~~~~~

* **Inbound:** Improve `AnymailInboundMessage`'s handling of inline content:

* Rename `inline_attachments` to `content_id_map`, more accurately reflecting its function.
* Add new `inlines` property that provides a complete list of inline content,
 whether or not it includes a *Content-ID*. This is helpful for accessing
 inline images that appear directly in a *multipart/mixed* body, such as those
 created by the Apple Mail app.
* Rename `is_inline_attachment()` to just `is_inline()`.

The renamed items are still available, but deprecated, under their old names.
See `docs <http://anymail.dev/en/stable/inbound/#anymail.inbound.AnymailInboundMessage>`__.
(Thanks to `martinezleoml`_.)

* **Inbound:** `AnymailInboundMessage` now derives from Python's
`email.message.EmailMessage`, which provides improved compatibility with
email standards. (Thanks to `martinezleoml`_.)

* **Brevo (Sendinblue):** Sendinblue has rebranded to "Brevo." Change default
API endpoint to ``api.brevo.com``, and update docs to reflect new name. Anymail
still uses ``sendinblue`` in the backend name, for settings, etc., so there
should be no impact on your code. (Thanks to `sblondon`_.)

* **Brevo (Sendinblue):** Add support for inbound email. (See
`docs <https://anymail.dev/en/stable/esps/sendinblue/#sendinblue-inbound>`__.)

* **SendGrid:** Support multiple ``reply_to`` addresses.
(Thanks to `gdvalderrama`_ for pointing out the new API.)

Deprecations
~~~~~~~~~~~~

* **Inbound:** `AnymailInboundMessage.inline_attachments` and `.is_inline_attachment()`
have been renamed---see above.

10.0

-----

*2023-05-07*

Breaking changes
~~~~~~~~~~~~~~~~

* **Amazon SES:** The Amazon SES backend now sends using the SES v2 API.
Most projects should not require code changes, but you may need to update
your IAM permissions. See
`Migrating to the SES v2 API <https://anymail.dev/en/stable/esps/amazon_ses/#amazon-ses-v2>`__.

If you were using SES v2 under Anymail 9.1 or 9.2, change your
``EMAIL_BACKEND`` setting from ``amazon_sesv2`` to just ``amazon_ses``.

(If you are not ready to migrate to SES v2, an ``amazon_sesv1`` EmailBackend
is available. But Anymail will drop support for that later this year. See
`Using SES v1 (deprecated) <https://anymail.dev/en/stable/esps/amazon_ses/#amazon-ses-v1>`__.)

* **Amazon SES:** The "extra name" for installation must now be spelled with
a hyphen rather than an underscore: ``django-anymail[amazon-ses]``.
Be sure to update any dependencies specification (pip install, requirements.txt,
etc.) that had been using ``[amazon_ses]``. (This change is due to
package name normalization rules enforced by modern Python packaging tools.)

* **Mandrill:** Remove support for Mandrill-specific message attributes left over
from Djrill. These attributes have raised DeprecationWarnings since Anymail 0.3
(in 2016), but are now silently ignored. See
`Migrating from Djrill <https://anymail.dev/en/v10.0/esps/mandrill/#djrill-message-attributes>`__.

* Require Python 3.7 or later.

* Require urllib3 1.25 or later. (Drop a workaround for older urllib3 releases.
urllib3 is a requests dependency; version 1.25 was released 2019-04-29. Unless
you are pinning an earlier urllib3, this change should have no impact.)

Features
~~~~~~~~

* **Postmark inbound:**

* Handle Postmark's "Include raw email content in JSON payload"
 inbound option. We recommend enabling this in Postmark's dashboard
 to get the most accurate representation of received email.
* Obtain ``envelope_sender`` from *Return-Path* Postmark now provides.
 (Replaces potentially faulty *Received-SPF* header parsing.)
* Add *Bcc* header to inbound message if provided. Postmark adds bcc
 when the delivered-to address does not appear in the *To* header.

Other
~~~~~

* Modernize packaging. (Change from setup.py and setuptools
to pyproject.toml and hatchling.) Other than the ``amazon-ses``
naming normalization noted above, the new packaging should have
no impact. If you have trouble installing django-anymail v10 where
v9 worked, please report an issue including the exact install
command and pip version you are using.

9.2

-----

*2023-05-02*

Fixes
~~~~~

* Fix misleading error messages when sending with ``fail_silently=True``
and session creation fails (e.g., with Amazon SES backend and missing
credentials). (Thanks to `technolingo`_.)

* **Postmark inbound:** Fix spurious AnymailInvalidAddress in ``message.cc``
when inbound message has no Cc recipients. (Thanks to `Ecno92`_.)

* **Postmark inbound:** Add workaround for malformed test data sent by
Postmark's inbound webhook "Check" button. (See `304`_. Thanks to `Ecno92`_.)

Deprecations
~~~~~~~~~~~~

* This will be the last Anymail release to support Python 3.6
(which reached end-of-life on 2021-12-23).

Other
~~~~~

* Test against Django 4.2 release.

9.1

----

*2023-03-11*

Features
~~~~~~~~

* **Amazon SES:** Add support for sending through the Amazon SES v2 API
(not yet enabled by default; see Deprecations below;
`docs <https://anymail.dev/en/stable/esps/amazon_ses/#amazon-ses-v2>`__).

* **MailerSend:** Add support for this ESP
(`docs <https://anymail.dev/en/stable/esps/mailersend/>`__).

Deprecations
~~~~~~~~~~~~

* **Amazon SES:** Anymail will be switching to the Amazon SES v2 API.
Support for the original SES v1 API is now deprecated, and will be dropped in a
future Anymail release (likely in late 2023). Many projects will not
require code changes, but you may need to update your IAM permissions. See
`Migrating to the SES v2 API <https://anymail.dev/en/stable/esps/amazon_ses/#amazon-ses-v2>`__.

Other
~~~~~

* Test against Django 4.2 prerelease, Python 3.11 (with Django 4.2),
and PyPy 3.9.

* Use black, isort and doc8 to format code,
enforced via pre-commit. (Thanks to `tim-schilling`_.)

9.0

----

*2022-12-18*

Breaking changes
~~~~~~~~~~~~~~~~

* Require **Django 3.0 or later** and Python 3.6 or later. (For compatibility
with Django 2.x or Python 3.5, stay on the Anymail `v8.6 LTS`_ extended support
branch by setting your requirements to `django-anymail~=8.6`.)

Features
~~~~~~~~

* **Sendinblue:** Support delayed sending using Anymail's `send_at` option.
(Thanks to `dimitrisor`_ for noting Sendinblue's public beta release
of this capability.)
* Support customizing the requests.Session for requests-based backends,
and document how this can be used to mount an adapter that simplifies
automatic retry logic. (Thanks to `dgilmanAIDENTIFIED`_.)
* Confirm support for Django 4.1 and resolve deprecation warning regarding
``django.utils.timezone.utc``. (Thanks to `tim-schilling`_.)

Fixes
~~~~~

* **Postmark:** Handle Postmark's SubscriptionChange events as Anymail
unsubscribe, subscribe, or bounce tracking events, rather than "unknown".
(Thanks to `puru02`_ for the fix.)
* **Sendinblue:** Work around recent (unannounced) Sendinblue API change
that caused "Invalid headers" API error with non-string custom header
values. Anymail now converts int and float header values to strings.


Other
~~~~~

* Test on Python 3.11 with Django development (Django 4.2) branch.

8.6

--------

*2022-05-15*

This is an extended support release. Anymail v8.6 will receive security updates
and fixes for any breaking ESP API changes through at least May, 2023.

Fixes
~~~~~

* **Mailgun and SendGrid inbound:** Work around a Django limitation that
drops attachments with certain filenames. The missing attachments
are now simply omitted from the resulting inbound message. (In earlier
releases, they would cause a MultiValueDictKeyError in Anymail's
inbound webhook.)

Anymail documentation now recommends using Mailgun's and SendGrid's "raw MIME"
inbound options, which avoid the problem and preserve all attachments.

See `Mailgun inbound <https://anymail.dev/en/stable/esps/mailgun/#mailgun-inbound>`__
and `SendGrid inbound <https://anymail.dev/en/stable/esps/sendgrid/#sendgrid-inbound>`__
for details. (Thanks to `erikdrums`_ for reporting and helping investigate the problem.)

Other
~~~~~

* **Mailgun:** Document Mailgun's incorrect handling of display names containing
both non-ASCII characters and punctuation. (Thanks to `Flexonze`_ for spotting and
reporting the issue, and to Mailgun's `b0d0nne11`_ for investigating.)

* **Mandrill:** Document Mandrill's incorrect handling of non-ASCII attachment filenames.
(Thanks to `Thorbenl`_ for reporting the issue and following up with MailChimp.)

* Documentation (for all releases) is now hosted at anymail.dev (moved from anymail.info).

Deprecations
~~~~~~~~~~~~

*  This will be the last Anymail release to support Django 2.0--2.2 and Python 3.5.

If these deprecations affect you and you cannot upgrade, set your requirements to
`django-anymail~=8.6` (a "compatible release" specifier, equivalent to `>=8.6,==8.*`).

8.5

----

*2022-01-19*

Fixes
~~~~~

* Allow `attach_alternative("content", "text/plain")` in place of setting
an EmailMessage's `body`, and generally improve alternative part
handling for consistency with Django's SMTP EmailBackend.
(Thanks to `cjsoftuk`_ for reporting the issue.)

* Remove "sending a message from *sender* to *recipient*" from `AnymailError`
text, as this can unintentionally leak personal information into logs.
[Note that `AnymailError` *does* still include any error description
from your ESP, and this often contains email addresses and other content
from the sent message. If this is a concern, you can adjust Django's logging
config to limit collection from Anymail or implement custom PII filtering.]
(Thanks to `coupa-anya`_ for reporting the issue.)


Other
~~~~~

* **Postmark:** Document limitation on `track_opens` overriding Postmark's
server-level setting. (See
`docs <https://anymail.dev/en/stable/esps/postmark/#limitations-and-quirks>`__.)

* Expand `testing documentation <https://anymail.dev/en/stable/tips/testing/>`__
to cover tracking events and inbound handling, and to clarify test EmailBackend behavior.

* In Anymail's test EmailBackend, add `is_batch_send` boolean to `anymail_test_params`
to help tests check whether a sent message would fall under Anymail's batch-send logic.

8.4

----

*2021-06-15*

Features
~~~~~~~~

* **Postal:** Add support for this self-hosted ESP
(`docs <https://anymail.dev/en/stable/esps/postal>`__).
Thanks to `tiltec`_ for researching, implementing, testing and
documenting Postal support.

8.3

----

*2021-05-19*

Fixes
~~~~~

* **Amazon SES:** Support receiving and tracking mail in non-default (or multiple)
AWS regions. Anymail now always confirms an SNS subscription in the region where
the SNS topic exists, which may be different from the boto3 default. (Thanks to
`mark-mishyn`_ for reporting this.)

* **Postmark:** Fix two different errors when sending with a template but no merge
data. (Thanks to `kareemcoding`_ and `Tobeyforce`_ for reporting them.)

* **Postmark:** Fix silent failure when sending with long metadata keys and some
other errors Postmark detects at send time. Report invalid 'cc' and 'bcc' addresses
detected at send time the same as 'to' recipients. (Thanks to `chrisgrande`_ for
reporting the problem.)

8.2

-----

*2021-01-27*

Features
~~~~~~~~

* **Mailgun:** Add support for AMP for Email
(via ``message.attach_alternative(..., "text/x-amp-html")``).

Fixes
~~~~~

* **SparkPost:** Drop support for multiple `from_email` addresses. SparkPost has
started issuing a cryptic "No sending domain specified" error for this case; with
this fix, Anymail will now treat it as an unsupported feature.

Other
~~~~~

* **Mailgun:** Improve error messages for some common configuration issues.

* Test against Django 3.2 prerelease (including support for Python 3.9)

* Document how to send AMP for Email with Django, and note which ESPs support it.
(See `docs <https://anymail.dev/en/stable/sending/django_email/#amp-email>`__.)

* Move CI testing to GitHub Actions (and stop using Travis-CI).

* Internal: catch invalid recipient status earlier in ESP response parsing

8.1

----

*2020-10-09*

Features
~~~~~~~~

* **SparkPost:** Add option for event tracking webhooks to map SparkPost's "Initial Open"
event to Anymail's normalized "opened" type. (By default, only SparkPost's "Open" is
reported as Anymail "opened", and "Initial Open" maps to "unknown" to avoid duplicates.
See `docs <https://anymail.dev/en/stable/esps/sparkpost/#sparkpost-webhooks>`__.
Thanks to `slinkymanbyday`_.)

* **SparkPost:** In event tracking webhooks, map AMP open and click events to the
corresponding Anymail normalized event types. (Previously these were treated as
as "unknown" events.)
Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant