We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9790b02 commit 9864ce1Copy full SHA for 9864ce1
Lib/urllib/parse.py
@@ -460,7 +460,7 @@ def _check_bracketed_netloc(netloc):
460
# https://www.rfc-editor.org/rfc/rfc3986#page-49 and https://url.spec.whatwg.org/
461
def _check_bracketed_host(hostname):
462
if hostname.startswith('v'):
463
- if not re.match(r"\Av[a-fA-F0-9]+\.[\w\.~!$&*+,;=:'()-]+\z", hostname):
+ if not re.match(r"\Av[a-fA-F0-9]+\.[\w\.~!$&*+,;=:'()-]+\z", hostname, flags=re.ASCII):
464
raise ValueError(f"IPvFuture address is invalid")
465
else:
466
ip = ipaddress.ip_address(hostname) # Throws Value Error if not IPv6 or IPv4
0 commit comments