[issue42234] pathlib relative_to behaviour change

2022-02-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42234] pathlib relative_to behaviour change

2021-06-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pathlib's relative_to should behave like os.path.relpath

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42234] pathlib relative_to behaviour change

2021-05-16 Thread Barney Gale


Barney Gale  added the comment:

In fact, I think this is a duplicate of issue40358, which has an open PR 
against it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42234] pathlib relative_to behaviour change

2021-05-16 Thread Barney Gale


Barney Gale  added the comment:

That does sound pretty useful! I'd be happy to review a PR though I'm not a 
core dev.

--
nosy: +barneygale

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42234] pathlib relative_to behaviour change

2020-11-01 Thread Armins Stepanjans


New submission from Armins Stepanjans :

In the docs 
(https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.relative_to) 
PurePath.relative_to() is specified to fail for arguments that are not on the 
original path (e.g. Path('/ham/beans').relative_to(Path('/spam'))).

I believe it would be useful to extend the behaviour of relative_to so that it 
handles the case above. For example, I would expect 
Path('/ham/beans').relative_to(Path('/spam')) to return Path('../ham/beans').

If this sounds like a useful change I'd be happy to make a PR for it.

--
components: Library (Lib)
messages: 380148
nosy: armins.bagrats
priority: normal
severity: normal
status: open
title: pathlib relative_to behaviour change
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com