Commit eacd908f authored by Jérome Perrin's avatar Jérome Perrin

patches/diff: emit DeprecationWarning only once

parent 9c2facdd
...@@ -31,13 +31,9 @@ from collections import Mapping ...@@ -31,13 +31,9 @@ from collections import Mapping
from collections import Iterable from collections import Iterable
try: try:
from deepdiff import DeepDiff from deepdiff import DeepDiff
except ImportError:
DeepDiff = None
warnings.warn("Please install deepdiff, it is needed by json_representable mixin",
DeprecationWarning)
try:
from deepdiff.helper import strings, numbers from deepdiff.helper import strings, numbers
except ImportError: except ImportError:
DeepDiff = None
strings = None strings = None
numbers = None numbers = None
warnings.warn("Please install deepdiff, it is needed by json_representable mixin", warnings.warn("Please install deepdiff, it is needed by json_representable mixin",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment