Make requests optional for backends that don't need it

(Prep for installing backends as package extras)

* Extract AnymailRequestsBackend and RequestsPayload
  to base_requests.py
* Don't define/require requests exceptions when requests
  not available
This commit is contained in:
medmunds
2016-03-04 17:39:43 -08:00
parent 38729df93c
commit 0a5bca1426
4 changed files with 166 additions and 141 deletions

View File

@@ -3,7 +3,7 @@ from datetime import date, datetime
from ..exceptions import AnymailRequestsAPIError, AnymailRecipientsRefused
from ..utils import last, combine, get_anymail_setting
from .base import AnymailRequestsBackend, RequestsPayload
from .base_requests import AnymailRequestsBackend, RequestsPayload
class MandrillBackend(AnymailRequestsBackend):