Remove "!" character from the "unreserved" characters in IPv6 Zone ID parsing
ADD
changelog/2899.bugfix.rst
+Removed '!' from _UNRESERVED_PAT as specified in the RFC.

MODIFY
src/urllib3/util/url.py
src/urllib3/util/url.py
@@ -48,9 +48,7 @@ _variations = [
"(?:(?:%(hex)s:){0,6}%(hex)s)?::",
]
-_UNRESERVED_PAT = (
- r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~"
-)
+_UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~"
_IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
_ZONE_ID_PAT = "(?:%25|%)(?:[" + _UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
_IPV6_ADDRZ_PAT = r"\[" + _IPV6_PAT + r"(?:" + _ZONE_ID_PAT + r")?\]"

Remove "!" character from the "unreserved" characters in IPv6 Zone ID parsing