Changes by Aaron Meurer aaron.meu...@continuum.io:
--
nosy: +Aaron Meurer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19918
___
___
Chris Jerdonek added the comment:
Was this also fixed for Mac OS X? Mac OS X is also case-insensitive by
default, and on Python 3.4.2 I'm getting:
Path(Foo).relative_to(foo)
Traceback (most recent call last):
File stdin, line 1, in module
File
Antoine Pitrou added the comment:
pathlib is case-sensitive under OS X (under any non-Windows platform actually).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19918
___
Roundup Robot added the comment:
New changeset 763f4416c4fd by Antoine Pitrou in branch 'default':
Issue #19918: Fix PurePath.relative_to() under Windows.
http://hg.python.org/cpython/rev/763f4416c4fd
--
nosy: +python-dev
___
Python tracker
Antoine Pitrou added the comment:
Thanks! I've tweaked the patch a bit and committed it.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19918
___
___
New submission from Serhiy Storchaka:
import pathlib
pathlib.PureWindowsPath('C:/Foo/Bar').relative_to('C:/Foo')
PureWindowsPath('Bar')
pathlib.PureWindowsPath('C:/Foo/Bar').relative_to('C:/foo')
Traceback (most recent call last):
File stdin, line 1, in module
File
Serhiy Storchaka added the comment:
Here is a patch which fixes first bug.
--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file33022/pathlib_relative_to.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Actually relative_to() returns invalid path object.
import pathlib
p = pathlib.PureWindowsPath('C:/Foo/Bar/Baz').relative_to('C:')
p
PureWindowsPath('//Foo/Bar/Baz')
str(p)
'Foo\\Bar\\Baz'
p.drive
''
p.root
''
p.parts
('\\', 'Foo', 'Bar', 'Baz')