This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: urlparse does not handle passwords with ? in them.
Type: Stage:
Components: Library (Lib) Versions: Python 3.5
Status: closed Resolution: duplicate
Dependencies: Superseder: urlparse, urlsplit confused when password includes fragment (#), query (?)
View: 18140
Assigned To: Nosy List: Rob Church, martin.panter
Priority: normal Keywords:

Created on 2016-03-16 21:01 by Rob Church, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg261860 - (view) Author: Rob Church (Rob Church) Date: 2016-03-16 21:01
>>> urlparse('http://user:pass?')
ParseResult(scheme='http', netloc='user:pass', path='', params='', query='', fragment='')

Expected output is:

ParseResult(scheme='http', netloc='user:pass?', path='/path', params='', query='query', fragment='')
msg261864 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-03-16 21:23
I think this is the same as Issue 18140. Perhaps you can answer my question at the bottom there about why the question mark is not encoded, and why splitting at the at (@) symbol should be higher priority than the query (?) symbol.
Date User Action Args
2022-04-11 14:58:28adminsetgithub: 70759
2016-03-16 21:23:17martin.pantersetstatus: open -> closed

nosy: + martin.panter
messages: + msg261864

superseder: urlparse, urlsplit confused when password includes fragment (#), query (?)
resolution: duplicate
2016-03-16 21:01:16Rob Churchcreate