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 eryksun
Recipients John15321, arhadthedev, eryksun
Date 2022-04-01.14:26:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648823215.53.0.311335853672.issue47161@roundup.psfhosted.org>
In-reply-to
Content
> Hmm..., I get it, but Im not gonna lie it's pretty confusing given 
> that in other places `//` works as a substitute for `/`. Maybe it 
> should be mentioned in the documentation?

In Linux, the system resolves "//" as just "/". In other POSIX systems, such as Cygwin or MSYS2 (running in Windows), "//" is a UNC path of the form "//server/share/filepath". I would expect resolve() to handle this. For example:

Linux:

    >>> p = pathlib.Path('//tmp')
    >>> p
    PosixPath('//tmp')
    >>> p.resolve()
    PosixPath('/tmp')

However, resolve() is broken for a UNC path in 3.9 under MSYS2:

    >>> p = pathlib.Path('//localhost/C$/temp')
    >>> p.exists()
    True
    >>> p.resolve()
    PosixPath('/localhost/C$/temp')
    >>> p.resolve().exists()
    False

realpath() is also broken for this case in 3.9 under MSYS2:

    >>> os.path.realpath(p)
    '/localhost/C$/temp'
History
Date User Action Args
2022-04-01 14:26:55eryksunsetrecipients: + eryksun, arhadthedev, John15321
2022-04-01 14:26:55eryksunsetmessageid: <1648823215.53.0.311335853672.issue47161@roundup.psfhosted.org>
2022-04-01 14:26:55eryksunlinkissue47161 messages
2022-04-01 14:26:55eryksuncreate