[stdlib-sig] urllib.parrrrse does not supporrrrt bytes
armin.ronacher at active-4.com
Sun Sep 20 22:21:13 CEST 2009
Antoine Pitrou schrieb:
> You know, it would be better if you demonstrated that the behaviour is
> broken, rather than asserting it. The fact that a long discussion led to
> the current API is a good hint that it is probably not as broken as you
> make it to be.
So if you look at a current version of urllib.parse on Python 3.1 you
can observe the following behavior:
- quote and quote_plus are written to support bytes by forwarding the
- the unquote and unquote_plus functions do not work with bytes at all.
You can currently quote to bytes, but don't go the other way.
- None of the URL parsing functions currently work with bytes.
- None of the URL joining functions currently work with bytes.
- You cannot specifiy the URL encoding to urlencode, parse_qs and
parse_qsl. Currently you can only decode/encode utf-8 data with
More information about the stdlib-sig