eryksun added the comment:
site.addpackage calls site.makepath(sitedir, line):
def makepath(*paths):
dir = os.path.join(*paths)
try:
dir = os.path.abspath(dir)
except OSError:
pass
return dir, os.path.normcase(dir)
In 2.7.7, os.path.join gets this wrong. For example:
>>> print os.path.join(r'C:\Spam\Eggs', r'\\Eggs\Spam')
C:\\Eggs\Spam
3.4 gets it right:
>>> print(os.path.join(r'C:\Spam\Eggs', r'\\Eggs\Spam'))
\\Eggs\Spam
ntpath.join was reimplemented for issue 19456. The rewrite depends on
ntpath.splitdrive, but 2.x has the old splitdrive that doesn't handle UNC paths:
>>> os.path.splitdrive(r'\\Spam\Eggs')
('', '\\\\Spam\\Eggs')
Instead there's ntpath.splitunc (deprecated in 3.1+):
>>> os.path.splitunc(r'\\Spam\Eggs')
('\\\\Spam\\Eggs', '')
Maybe ntpath.join could also try splitunc, or maybe 3.x splitdrive can be
backported.
2.7.7 ntpath.join:
http://hg.python.org/cpython/file/f89216059edf/Lib/ntpath.py#l61
----------
nosy: +eryksun
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21672>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com