Guido van Rossum <[EMAIL PROTECTED]> added the comment: Reducing priority to critical, it's just docs and tweaks from here.
You should also support bytearray() in ntpath: > isinstance(path, (bytes, bytearray)) No, you shouldn't. I changed my mind on this several times and in the end figured it's good enough to just support bytes and str instances. Amaury: I've reviewed your patch and ran test_ntpath.py on a Linux box. I get this traceback: ====================================================================== ERROR: test_relpath (__main__.TestNtpath) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ntpath.py", line 188, in test_relpath tester('ntpath.relpath("a")', 'a') File "Lib/test/test_ntpath.py", line 22, in tester gotResult = eval(fn) File "<string>", line 1, in <module> File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 530, in relpath start_list = abspath(start).split(sep) File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 499, in abspath path = join(os.getcwd(), path) File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 137, in join if b[:1] in seps: TypeError: 'in <string>' requires string as left operand, not bytes ---------------------------------------------------------------------- The fix is to change the fallback abspath to this code: def abspath(path): """Return the absolute version of a path.""" if not isabs(path): if isinstance(path, bytes): cwd = os.getcwdb() else: cwd = os.getcwd() path = join(cwd, path) return normpath(path) Once you fix that please check it in! ---------- priority: release blocker -> critical _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3187> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com