diff options
author | Barney Gale <barney.gale@gmail.com> | 2022-11-25 19:15:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 19:15:57 (GMT) |
commit | ae234fbc5ce045066448f2f0cda2f1c3c7ddebea (patch) | |
tree | d6ae5bf83f31bb68927a75f1f2e7172062797771 /Misc | |
parent | 7d2dcc53d09fe903329926bf7bbfe460b1465dab (diff) | |
download | cpython-ae234fbc5ce045066448f2f0cda2f1c3c7ddebea.zip cpython-ae234fbc5ce045066448f2f0cda2f1c3c7ddebea.tar.gz cpython-ae234fbc5ce045066448f2f0cda2f1c3c7ddebea.tar.bz2 |
gh-99029: Fix handling of `PureWindowsPath('C:\<blah>').relative_to('C:')` (GH-99031)
`relative_to()` now treats naked drive paths as relative. This brings its
behaviour in line with other parts of pathlib, and with `ntpath.relpath()`,
and so allows us to factor out the pathlib-specific implementation.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-11-02-23-47-07.gh-issue-99029.7uCiIB.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-11-02-23-47-07.gh-issue-99029.7uCiIB.rst b/Misc/NEWS.d/next/Library/2022-11-02-23-47-07.gh-issue-99029.7uCiIB.rst new file mode 100644 index 0000000..0bfba5e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-11-02-23-47-07.gh-issue-99029.7uCiIB.rst @@ -0,0 +1,2 @@ +:meth:`pathlib.PurePath.relative_to()` now treats naked Windows drive paths +as relative. This brings its behaviour in line with other parts of pathlib. |