pathlib ABCs: restore `relative_to()` and `is_relative_to()` (#138853)
Restore `JoinablePath.[is_]relative_to()`, which were deleted in ef63cca494571f50906baae1d176469a3dcf8838. These methods are too useful to forgo. Restore old tests, and add new tests covering path classes with non-overridden `__eq__()` and `__hash__()`. Slightly simplify `PurePath.relative_to()` while we're in the area. No change to public APIs, because the pathlib ABCs are still private.
B
Barney Gale committed
49aaee7978c54211967392678072accc403d15f2
Parent: b881df4
Committed by GitHub <noreply@github.com>
on 10/10/2025, 6:08:55 PM