Skip to content

cannot create a UNC path drive from parts #120943

Closed as not planned
Closed as not planned
@kfot

Description

@kfot

Bug report

Bug description:

# on Windows
import os
import pathlib 
parts = "\\\\", "host", "share", "whatever"
os.path.join(*parts)  # way 1, os.path is ntpath here
pathlib.Path(*parts)  # way 2, uses ntpath underneath
# None of these ways create a valid UNC. As a developer, I expect it to work the same as posixpath.join or have it documented why it doesn't

CPython versions tested on:

3.8, 3.9, 3.10, 3.11, 3.12, 3.13

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.8 (EOL)end of life3.9only security fixesOS-windowspendingThe issue will be closed if no feedback is providedstdlibPython modules in the Lib dirtopic-pathlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions