Martin Panter added the comment:
Marking as Python 3 since you mentioned urllib.parse, rather than just urllib.
However you need to be more specific. We already have a urllib.parse.urlsplit()
function which seems to do what you want:
>>> urllib.parse.urlsplit("http://example.com/;").path
'/;'
I see that the “params” bit can be dropped by urljoin(). My proposal in Issue
22852 could probably be adapted to help with that.
----------
nosy: +martin.panter
stage: -> test needed
versions: +Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com