Author pitrou
Recipients BreamoreBoy, adamnelson, ajaksu2, collinwinter, eric.araujo, ezio.melotti, mastrodomenico, mgiuca, nagle, orsenthil, pitrou, vak, varmaa, vstinner
Date 2010-07-19.11:25:28
SpamBayes Score 0.00425543
Marked as misclassified No
Message-id <1279538730.58.0.545269064043.issue1712522@psf.upfronthosting.co.za>
In-reply-to
Content
> It's definitely a bug in urllib

A bug in what way? Up to 2.6 (*), the docs state nothing about the type of the "string" parameter.
(*) http://docs.python.org/release/2.6.5/library/urllib.html#urllib.quote

I think everyone assumed that the parameter should be a "str" object and nothing else. Apparently some people used it accidentally with some unicode strings and it "worked" until these strings contained non-ASCII characters. But it's a side-effect of how 2.x unicode strings work, and it doesn't seem to me quote() was ever intended to accept unicode strings.

If we were following you, we would add "encoding" and "errors" arguments to any str-accepting 2.x function, so that it can also accept unicode strings. That's certainly not a reasonable solution.
History
Date User Action Args
2010-07-19 11:25:30pitrousetrecipients: + pitrou, collinwinter, varmaa, nagle, orsenthil, vstinner, ajaksu2, ezio.melotti, eric.araujo, mgiuca, mastrodomenico, vak, adamnelson, BreamoreBoy
2010-07-19 11:25:30pitrousetmessageid: <1279538730.58.0.545269064043.issue1712522@psf.upfronthosting.co.za>
2010-07-19 11:25:29pitroulinkissue1712522 messages
2010-07-19 11:25:28pitroucreate