summaryrefslogtreecommitdiffstats
path: root/Lib/ipaddress.py
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2023-10-22 18:50:51 (GMT)
committerGitHub <noreply@github.com>2023-10-22 18:50:51 (GMT)
commit767f416feb551f495bacfff1e9ba1e6672c2f24e (patch)
tree3a6e8d6afdd83ed9372c15759aa8f2617a4a7733 /Lib/ipaddress.py
parentb845a9e145b2f133270aa07836c7e6a385066c00 (diff)
downloadcpython-767f416feb551f495bacfff1e9ba1e6672c2f24e.zip
cpython-767f416feb551f495bacfff1e9ba1e6672c2f24e.tar.gz
cpython-767f416feb551f495bacfff1e9ba1e6672c2f24e.tar.bz2
gh-110196: Fix ipaddress.IPv6Address.__reduce__ (GH-110198)
Diffstat (limited to 'Lib/ipaddress.py')
-rw-r--r--Lib/ipaddress.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py
index f5aba43..68ddfbe 100644
--- a/Lib/ipaddress.py
+++ b/Lib/ipaddress.py
@@ -1970,6 +1970,9 @@ class IPv6Address(_BaseV6, _BaseAddress):
return False
return self._scope_id == getattr(other, '_scope_id', None)
+ def __reduce__(self):
+ return (self.__class__, (str(self),))
+
@property
def scope_id(self):
"""Identifier of a particular zone of the address's scope.