Message219097
In Python 2 str is coerced to unicode, so most functions should return the same (or compatible) result for str and unicode argument if it contains only 7-bit ASCII characters. Of course there are several obvious exceptions, such as type() or repr(). And presumably there are several bugs.
Apparently the actual bug in your case is that os.path.relpath(u'test_srcl.txt', u'.') and os.path.relpath(u'test_srcl.txt', '.') return totally different results.
What are os.getcwd(), os.getcwdu(), ntpath.abspath(ntpath.normpath(p)) for p in [u'test_srcl.txt', 'test_srcl.txt', u'.', '.'] in your case? |
|
Date |
User |
Action |
Args |
2014-05-25 16:27:46 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Matt.Bachmann |
2014-05-25 16:27:46 | serhiy.storchaka | set | messageid: <1401035266.47.0.487640288634.issue21343@psf.upfronthosting.co.za> |
2014-05-25 16:27:46 | serhiy.storchaka | link | issue21343 messages |
2014-05-25 16:27:46 | serhiy.storchaka | create | |
|