This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Matt.Bachmann, serhiy.storchaka
Date 2014-05-25.16:27:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401035266.47.0.487640288634.issue21343@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2014-05-25 16:27:46serhiy.storchakasetrecipients: + serhiy.storchaka, Matt.Bachmann
2014-05-25 16:27:46serhiy.storchakasetmessageid: <1401035266.47.0.487640288634.issue21343@psf.upfronthosting.co.za>
2014-05-25 16:27:46serhiy.storchakalinkissue21343 messages
2014-05-25 16:27:46serhiy.storchakacreate