diff options
author | Julian Berman <Julian@GrayVines.com> | 2020-10-20 09:55:12 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2020-10-20 11:56:03 -0400 |
commit | a11ab2b1a9c344b12578eb5fc372023467f180ba (patch) | |
tree | 036a06c3cfdf12f607178904e1043e0bc34bce04 | |
parent | a439f30a4ae6643db4ab4aa186a61ddf347ebf58 (diff) | |
download | jsonschema-a11ab2b1a9c344b12578eb5fc372023467f180ba.tar.gz |
Cope with IPv6Address now allowing zone IDs in 3.9.
-rw-r--r-- | jsonschema/_format.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jsonschema/_format.py b/jsonschema/_format.py index ce47864..cdbe44b 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -199,7 +199,8 @@ def is_ipv4(instance): def is_ipv6(instance): if not isinstance(instance, str): return True - return ipaddress.IPv6Address(instance) + address = ipaddress.IPv6Address(instance) + return not getattr(address, "scope_id", "") try: |