Message110782
There are two points here:
First, is it a desired behavior of quote function in 2.7?
IMO, it is. In the discussions of issue3300, I think, it was decided that quote handling of unicode strings may be backported. Behaviour wise the modified version still returns a string which is correct for py2.
The forward compatibility on 2.7.1 version here is on the basis that someone in 2.7 might be relying on Exception raised for Unicode string "for the quote function".
But my guess is, when they are trying to quote non-ascii characters using quote function which is path component, they might be expecting that it gives them a correct output and this (now) modified function would be of help.
Of the many cases we have on Unicode being auto-coerced to 8-bit string, this particular case of using UTF-8 as default encoding for Unicode and returning a string seems to be fine (again discussed in the earlier issue). We might not have good answers for many other cases.
The Second point, as this is leading to an API change we should not have it 2.7.1
It would be unfortunate, if we revert the patch on this account only.
This can be classified a bug-fix producing the desirable behavior, just that it needs the API to change too. I don't know if we have never adopted this approach (of changing API in backward compatible manner) for anything other than the security bug fixes alone. |
|
Date |
User |
Action |
Args |
2010-07-19 16:59:24 | orsenthil | set | recipients:
+ orsenthil, collinwinter, varmaa, nagle, pitrou, vstinner, ajaksu2, ezio.melotti, eric.araujo, mgiuca, mastrodomenico, vak, adamnelson, BreamoreBoy |
2010-07-19 16:59:24 | orsenthil | set | messageid: <1279558764.36.0.695692084053.issue1712522@psf.upfronthosting.co.za> |
2010-07-19 16:59:22 | orsenthil | link | issue1712522 messages |
2010-07-19 16:59:21 | orsenthil | create | |
|