serialization.py 435 B

1234567891011
  1. try:
  2. import dill
  3. # XXX: By default, dill writes the Pickler dispatch table to inject its
  4. # own logic there. This globally affects the behavior of the standard library
  5. # pickler for any user who transitively depends on this module!
  6. # Undo this extension to avoid altering the behavior of the pickler globally.
  7. dill.extend(use_dill=False)
  8. DILL_AVAILABLE = True
  9. except ImportError:
  10. DILL_AVAILABLE = False