Skip to content

Commit c7e581f

Browse files
committed
adding support to ip addresses
1 parent 662f9ba commit c7e581f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deepdiff/serialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import decimal # NOQA
1212
import orderly_set # NOQA
1313
import collections # NOQA
14+
import ipaddress
1415
from copy import deepcopy, copy
1516
from functools import partial
1617
from collections.abc import Mapping
@@ -121,7 +122,8 @@ class UnsupportedFormatErr(TypeError):
121122
'OrderedDict': collections.OrderedDict,
122123
'Pattern': re.Pattern,
123124
'iprange': str,
124-
'IPv4Address': str,
125+
'IPv4Address': ipaddress.IPv4Address,
126+
'IPv6Address': ipaddress.IPv6Address,
125127
}
126128

127129

0 commit comments

Comments
 (0)