install: remove need to name [esp]

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.
This commit is contained in:
medmunds
2016-03-14 13:26:06 -07:00
parent f95bf1fbc4
commit fed98b14a8
8 changed files with 24 additions and 51 deletions

View File

@@ -1,18 +1,13 @@
import json
import requests
# noinspection PyUnresolvedReferences
from six.moves.urllib.parse import urljoin
from .base import AnymailBaseBackend, BasePayload
from ..exceptions import AnymailImproperlyInstalled, AnymailRequestsAPIError, AnymailSerializationError
from ..exceptions import AnymailRequestsAPIError, AnymailSerializationError
from .._version import __version__
try:
# noinspection PyUnresolvedReferences
import requests
except ImportError:
raise AnymailImproperlyInstalled('requests')
class AnymailRequestsBackend(AnymailBaseBackend):
"""