diff options
author | Barney Gale <barney.gale@gmail.com> | 2022-08-12 21:23:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-12 21:23:41 (GMT) |
commit | 187949ebf2ae36fcf0817a06f4a7637d0a8b7fc5 (patch) | |
tree | 97e2247dba696d69d682cefedf05d760c926bb07 /Python/clinic/Python-tokenize.c.h | |
parent | a965db37f27ffb232312bc13d9a509f0d93fcd20 (diff) | |
download | cpython-187949ebf2ae36fcf0817a06f4a7637d0a8b7fc5.zip cpython-187949ebf2ae36fcf0817a06f4a7637d0a8b7fc5.tar.gz cpython-187949ebf2ae36fcf0817a06f4a7637d0a8b7fc5.tar.bz2 |
gh-94909: fix joining of absolute and relative Windows paths in pathlib (GH-95450)
Have pathlib use `os.path.join()` to join arguments to the `PurePath` initialiser, which fixes a minor bug when handling relative paths with drives.
Previously:
```python
>>> from pathlib import PureWindowsPath
>>> a = 'C:/a/b'
>>> b = 'C:x/y'
>>> PureWindowsPath(a, b)
PureWindowsPath('C:x/y')
```
Now:
```python
>>> PureWindowsPath(a, b)
PureWindowsPath('C:/a/b/x/y')
```
Diffstat (limited to 'Python/clinic/Python-tokenize.c.h')
0 files changed, 0 insertions, 0 deletions