GH-78707: Drop deprecated pathlib.PurePath.[is_]relative_to() arguments (#118780)

Remove support for supplying additional positional arguments to
`PurePath.relative_to()` and `is_relative_to()`. This has been deprecated
since Python 3.12.
This commit is contained in:
Barney Gale 2024-05-10 16:53:46 +01:00 committed by GitHub
parent 13d7cf997b
commit f772d0d08a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 29 deletions

View file

@ -311,19 +311,6 @@ class PurePathTest(test_pathlib_abc.DummyPurePathTest):
self.assertRaises(ValueError, P('a/b').with_stem, '')
self.assertRaises(ValueError, P('a/b').with_stem, '.')
def test_relative_to_several_args(self):
P = self.cls
p = P('a/b')
with self.assertWarns(DeprecationWarning):
p.relative_to('a', 'b')
p.relative_to('a', 'b', walk_up=True)
def test_is_relative_to_several_args(self):
P = self.cls
p = P('a/b')
with self.assertWarns(DeprecationWarning):
p.is_relative_to('a', 'b')
def test_is_reserved_deprecated(self):
P = self.cls
p = P('a/b')