Author eryksun
Recipients eryksun, jblairpdx
Date 2014-06-05.21:27:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402003658.98.0.401224267892.issue21672@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-06-05 21:27:39eryksunsetrecipients: + eryksun, jblairpdx
2014-06-05 21:27:38eryksunsetmessageid: <1402003658.98.0.401224267892.issue21672@psf.upfronthosting.co.za>
2014-06-05 21:27:38eryksunlinkissue21672 messages
2014-06-05 21:27:38eryksuncreate