diff options
author | Barney Gale <barney.gale@gmail.com> | 2023-04-14 20:55:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 20:55:41 (GMT) |
commit | 8af8f52d175959f03cf4a2786b6a81ec09e15e95 (patch) | |
tree | 8848581a801af299c17343a997acb5f1a06c9f40 /Misc | |
parent | 7c1b0a46c61f8bf8e2039bba1bff11b6ae20e56b (diff) | |
download | cpython-8af8f52d175959f03cf4a2786b6a81ec09e15e95.zip cpython-8af8f52d175959f03cf4a2786b6a81ec09e15e95.tar.gz cpython-8af8f52d175959f03cf4a2786b6a81ec09e15e95.tar.bz2 |
GH-78079: Fix UNC device path root normalization in pathlib (GH-102003)
We no longer add a root to device paths such as `//./PhysicalDrive0`,
`//?/BootPartition` and `//./c:` while normalizing. We also avoid adding a
root to incomplete UNC share paths, like `//`, `//a` and `//a/`.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-02-17-21-14-40.gh-issue-78079.z3Szr6.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-02-17-21-14-40.gh-issue-78079.z3Szr6.rst b/Misc/NEWS.d/next/Library/2023-02-17-21-14-40.gh-issue-78079.z3Szr6.rst new file mode 100644 index 0000000..bbb9ac3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-02-17-21-14-40.gh-issue-78079.z3Szr6.rst @@ -0,0 +1,3 @@ +Fix incorrect normalization of UNC device path roots, and partial UNC share +path roots, in :class:`pathlib.PurePath`. Pathlib no longer appends a +trailing slash to such paths. |