-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
urllib.parse currently supports the SIP URI scheme. However, it mislabels the netloc as the path.
>>> import urllib.parse
>>> urllib.parse.urlparse('sip:user:password@host:port;uri-parameters?headers')
ParseResult(scheme='sip', netloc='', path='user:password@host:port', params='uri-parameters', query='headers', fragment='')RFC 3261 defines the sip URI without slashes, like so:
sip:user:password@host:port;uri-parameters?headers
The correct ParseResult would be:
>>> urllib.parse.urlparse('sip:user:password@host:port;uri-parameters?headers')
ParseResult(scheme='sip', netloc='user:password@host:port', path='', params='uri-parameters', query='headers', fragment='')CPython versions tested on:
3.14
Operating systems tested on:
macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error