This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rotuna
Recipients Arfrever, chris.jerdonek, pitrou, rotuna, steve.dower, xtreak
Date 2020-04-15.23:13:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586992438.35.0.74876596002.issue23082@roundup.psfhosted.org>
In-reply-to
Content
I'll work on this. 

I tried to come up with a single error message but having two different error messages seems like a better idea to me. One for when the path isn't a subpath and one for when absolute and relative paths are mixed. Basically to explain this:

>>> Path("/Users/rotuna/Documents/cpython/Libs").relative_to(Path("./Libs"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rotuna/Documents/cpython/Lib/pathlib.py", line 907, in relative_to
    raise ValueError("{!r} is not a subpath of{!r}. NOTE: If this is not true, use absolute paths"
ValueError: '/Users/rotuna/Documents/cpython/Libs' does not start with 'Libs'
History
Date User Action Args
2020-04-15 23:13:58rotunasetrecipients: + rotuna, pitrou, Arfrever, chris.jerdonek, steve.dower, xtreak
2020-04-15 23:13:58rotunasetmessageid: <1586992438.35.0.74876596002.issue23082@roundup.psfhosted.org>
2020-04-15 23:13:58rotunalinkissue23082 messages
2020-04-15 23:13:58rotunacreate