classification
Title: pathlib.PureWindowsPath doesn't join relative paths correctly when a drive is present
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-12-06 11:50 by serhiy.storchaka, last changed 2013-12-06 15:26 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
joinwinpath.patch pitrou, 2013-12-06 12:15 review
joinwinpath_2.patch serhiy.storchaka, 2013-12-06 13:34 review
joinwinpath_3.patch serhiy.storchaka, 2013-12-06 14:46 review
Messages (9)
msg205364 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-06 11:50
>>> pathlib.PureWindowsPath('C:/a/b').joinpath('D:x/y')
PureWindowsPath('D:/a/b/D:/x/y')

See also issue19456.
msg205365 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-06 12:15
Here is a patch.
msg205369 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-06 13:34
Here is simplified patch.
msg205374 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-06 14:12
Thanks! Patch looks ok to me.
msg205375 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-06 14:46
Ah, drives should be compared with ignored cases.
msg205376 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-06 14:51
Good point :)
msg205377 - (view) Author: Roundup Robot (python-dev) Date: 2013-12-06 15:14
New changeset 1ba15c3f45fa by Serhiy Storchaka in branch 'default':
Issue #19908: pathlib now joins relative Windows paths correctly when a drive
http://hg.python.org/cpython/rev/1ba15c3f45fa
msg205378 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-06 15:20
Thank you Antoine for your patch.
msg205379 - (view) Author: Roundup Robot (python-dev) Date: 2013-12-06 15:26
New changeset 0c508d87f80b by Serhiy Storchaka in branch 'default':
Test same drive in different cases (issue #19908).
http://hg.python.org/cpython/rev/0c508d87f80b
History
Date User Action Args
2013-12-06 15:26:17python-devsetmessages: + msg205379
2013-12-06 15:20:54serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg205378

stage: resolved
2013-12-06 15:14:47python-devsetnosy: + python-dev
messages: + msg205377
2013-12-06 14:51:50pitrousetmessages: + msg205376
2013-12-06 14:46:55serhiy.storchakasetfiles: + joinwinpath_3.patch

messages: + msg205375
2013-12-06 14:12:26pitrousetmessages: + msg205374
2013-12-06 13:34:13serhiy.storchakasetfiles: + joinwinpath_2.patch

messages: + msg205369
2013-12-06 12:15:12pitrousetfiles: + joinwinpath.patch
keywords: + patch
messages: + msg205365
2013-12-06 11:50:09serhiy.storchakacreate