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
uri_to_iri and iri_to_uri drop an empty username or password #3189
uri_to_iri() and iri_to_uri() reconstruct the userinfo part of a URL using a truthiness check on username / password. Because an empty string is falsy, an empty-but-present username or password is silently dropped, even though urllib.parse.urlsplit distinguishes a present-but-empty component ("") from a missing one (None).
The first case is the most concerning: a non-empty password is dropped entirely when the username is empty, which is data loss during what should be a lossless normalization.
Expected behavior: an empty username or password that is present in the input should be preserved. Only a missing component (None) should be omitted.
Activity