Message9558

Author pekka.klarck
Recipients pekka.klarck
Date 2015-02-25.12:55:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424868907.25.0.469884213365.issue2274@psf.upfronthosting.co.za>
In-reply-to
Content
How severe this is depends on do we consider `os.path.abspath` turning byte strings to Unicode a bug or not (I'm in directory `böö` in these examples):

>>> abspath(u'.')
u'/home/peke/b\xf6\xf6'
>>> abspath('.')
u'/home/peke/b\xf6\xf6'
>>>

With CPython the latter returns byte string. Jython nowadays handles environment variables and such as Unicode, so perhaps Unicode is fine here too.

If we agree abspath always returning Unicode is fine, normpath possibly returning bytes is just a minor inconsistency. If abspath should return bytes or Unicode depending on the type of the input, like CPython does, there would be problems with `abspath(normpath(u'.'))` if the cwd would contain non-ASCII characters.
History
Date User Action Args
2015-02-25 12:55:07pekka.klarcksetmessageid: <1424868907.25.0.469884213365.issue2274@psf.upfronthosting.co.za>
2015-02-25 12:55:07pekka.klarcksetrecipients: + pekka.klarck
2015-02-25 12:55:07pekka.klarcklinkissue2274 messages
2015-02-25 12:55:06pekka.klarckcreate