@@ -362,21 +362,15 @@ def with_name(self, name):
362
362
tail [- 1 ] = name
363
363
return self ._from_parsed_parts (self .drive , self .root , tail )
364
364
365
- def relative_to (self , other , / , * _deprecated , walk_up = False ):
365
+ def relative_to (self , other , * , walk_up = False ):
366
366
"""Return the relative path to another path identified by the passed
367
367
arguments. If the operation is not possible (because this is not
368
368
related to the other path), raise ValueError.
369
369
370
370
The *walk_up* parameter controls whether `..` may be used to resolve
371
371
the path.
372
372
"""
373
- if _deprecated :
374
- msg = ("support for supplying more than one positional argument "
375
- "to pathlib.PurePath.relative_to() is deprecated and "
376
- "scheduled for removal in Python 3.14" )
377
- warnings .warn (msg , DeprecationWarning , stacklevel = 2 )
378
- other = self .with_segments (other , * _deprecated )
379
- elif not isinstance (other , PurePath ):
373
+ if not isinstance (other , PurePath ):
380
374
other = self .with_segments (other )
381
375
for step , path in enumerate (chain ([other ], other .parents )):
382
376
if path == self or path in self .parents :
@@ -390,16 +384,10 @@ def relative_to(self, other, /, *_deprecated, walk_up=False):
390
384
parts = ['..' ] * step + self ._tail [len (path ._tail ):]
391
385
return self ._from_parsed_parts ('' , '' , parts )
392
386
393
- def is_relative_to (self , other , / , * _deprecated ):
387
+ def is_relative_to (self , other ):
394
388
"""Return True if the path is relative to another path or False.
395
389
"""
396
- if _deprecated :
397
- msg = ("support for supplying more than one argument to "
398
- "pathlib.PurePath.is_relative_to() is deprecated and "
399
- "scheduled for removal in Python 3.14" )
400
- warnings .warn (msg , DeprecationWarning , stacklevel = 2 )
401
- other = self .with_segments (other , * _deprecated )
402
- elif not isinstance (other , PurePath ):
390
+ if not isinstance (other , PurePath ):
403
391
other = self .with_segments (other )
404
392
return other == self or other in self .parents
405
393
0 commit comments