Support using AnymailMessage with django-mailer

Make UNSET preserve its identity across pickling. (Also make its repr
mention "unset", to simplify interpretting stack traces.)

Fixes #147.
This commit is contained in:
medmunds
2019-05-08 13:16:01 -07:00
parent 4c443f5515
commit ebb6b041e7
3 changed files with 45 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ from .exceptions import AnymailConfigurationError, AnymailInvalidAddress
BASIC_NUMERIC_TYPES = six.integer_types + (float,) # int, float, and (on Python 2) long
UNSET = object() # Used as non-None default value
UNSET = type('UNSET', (object,), {}) # Used as non-None default value
def combine(*args):