Switch from the (now unmaintained) python-sparkpost
client library to a requests-based backend that calls
SparkPost's Transmissions API directly.
Also adds support for text/x-amp-html alternative parts
(which are supported by the SparkPost API, but weren't
by the client library).
Closes#203
Minimum supported versions are now Django 2.0, Python 3.5.
This touches a lot of code, to:
* Remove obsolete portability code and workarounds
(six, backports of email parsers, test utils, etc.)
* Use Python 3 syntax (class defs, raise ... from, etc.)
* Correct inheritance for mixin classes
* Fix outdated docs content and links
* Suppress Python 3 "unclosed SSLSocket" ResourceWarnings
that are beyond our control (in integration tests due to boto3,
python-sparkpost)
* Flesh out SendinBlue docs, add a readme mention
* Stop trying to list all the supported ESPs in the project short
description and similar headlines -- it was becoming unwieldy.
* Support `pip install django-anymail[sendinblue]`
and use it in Travis tests (for consistency; SendinBlue
doesn't require any extra packages)
* Follow current setup.py recommendations from the pypa sample project
(utf-8 encoding on file reads, ensure files are read relative to
own location)
* Add/update some missing classifiers and other metadata
* Read _version.py constants into an isolated dict (rather than
the global setup.py context)
* Add setup.cfg specifying universal bdist_wheel
* Remove "pre-1.0" warnings in docs, readme
* Jump trove classifer from pre-alpha all the way up to stable
(arguably this should have been "beta" for the past several months)
* The default (GitHub) readme should point
to the stable docs version, rather than
the latest development version.
* The frozen links in PyPI should use the full
patch version number (X.Y.Z), not just the minor
X.Y version. (Leftover from Djrill's branch-based
version management; Anymail uses tags
for versions, and old way was creating incorrect
frozen doc links for patch releases.)
Compatibility with Python 2.7 versions older than 2.7.7
* Use Django's constant_time_compare method
* Include sparkpost in test requirements
* Don't use non-public `EnvironmentVarGuard` in tests
Fixes#41
Simplify install to just `pip install django-anymail`.
(Rather than `... django-anymail[mailgun]`
All of the ESPs so far require requests, so just move
that into the base requirements. (Chances are your
Django app already needs requests for some other
reason, anyway.)
Truly unique ESP dependencies (e.g., boto for
AWS-SES) could still use the setup extra features
mechanism.
(Improves testing accuracy around API response encoding.)
* Add `six` as test dependency (six.BytesIO, six.b)
* Change MockResponse content to bytes (because HTTP responses
are bytes, not strings)
Djrill is known not to work on Django 1.2. (You could probably backport it without too much difficulty, but you would also run into requests compatibility issues.)
* Don't maintain similar overview in README.rst and docs/index.rst -- instead just include relevant portions of readme in the docs
* Patch up README version numbers and doc links in setup.py long_description to freeze them to the version being setup
* Suppress the Travis build status indicator in the docs and PyPI, since it can't be frozen to the specific version in question
* Release notes in readme
* Update example in readme
* Note deprecation of DjrillMessage class
* Longer long_description for PyPI
* Update authors
* Bump version number (setup.py and __init__.py)