You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
urllib.parse doesn't fully comply to RFC 3986 #78541
URLs are now covered by RFC 3986 which obsoletes RFC 1808 that `urllib's documentation refers to.
This new URL RFC adds [] to 'reserved' characters, so them being present unquoted anywhere where reserved characters are not allowed shall be a parsing error.
changed the title [-]urllib.parse doesn't fail with multiple unmatching square brackets[/-][+]urllib.parse doesn't fully comply to RFC 3986[/+]on Aug 10, 2018
Activity
The-Compiler commentedon Aug 8, 2018
Since bpo-29651, the urllib.parse docs say:
However, when there are at least one [ and ], but they don't match, there's somewhat inconsistent behavior:
native-api commentedon Aug 10, 2018
I confirm violation of https://tools.ietf.org/html/rfc3986#section-3.2.2 .
URLs are now covered by RFC 3986 which obsoletes RFC 1808 that `urllib's documentation refers to.
This new URL RFC adds [] to 'reserved' characters, so them being present unquoted anywhere where reserved characters are not allowed shall be a parsing error.
[-]urllib.parse doesn't fail with multiple unmatching square brackets[/-][+]urllib.parse doesn't fully comply to RFC 3986[/+]The-Compiler commentedon Feb 17, 2025
Looks like this has been fixed:
[and]) in domain names for parsed URLs #129418cc (and thanks!) @sethmlarson @ZeroIntensity
Update urlmatch tests for Python fixes
picnixz commentedon Feb 17, 2025
I'm going to close this one then as
completed.Update urlmatch tests for Python fixes