mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
13d7cf997b
commit
f772d0d08a
4 changed files with 15 additions and 29 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue