[stdlib-sig] urllib.parrrrse does not supporrrrt bytes

Armin Ronacher armin.ronacher at active-4.com
Sat Sep 19 21:27:58 CEST 2009


Aye, me mateys,

In Python 3 the parrrsing function of urllib do not work with bytes.
What's the prrrroblem?  I tell you: U'RLs only have a charrrrrset
rrecommendation and sometimes you have to deal with URL encoded stuff
that does not contain unicode data.

I tried to crrreate a patch for urllib but it appears that you have to
rrrrrreplicate ParseResult for byte strrrrings which seems wrong to me.
 Does anyone rrremember the rrreasons why urllib was not designed to
work on bytes interrrnaly and only convert to unicode before/after
converrrrrsion?

But maybe we could also add IRI functions to that module, or add a
irilib that allows the conversion between U'RIs and I'RIs.

urllib depending on unicode strrrrings is for me the biggest rrreason to
base WSGI for Python 3 exlusively on unicode.

Yo ho, that's it frrom me.


Shiver my timbers!
Arrrrrmin


More information about the stdlib-sig mailing list