aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Lib/pathlib/_abc.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/pathlib/_abc.py b/Lib/pathlib/_abc.py
index cfd59ece246..efe56ec565c 100644
--- a/Lib/pathlib/_abc.py
+++ b/Lib/pathlib/_abc.py
@@ -395,9 +395,8 @@ class PurePathBase:
if _deprecated:
msg = ("support for supplying more than one positional argument "
"to pathlib.PurePath.relative_to() is deprecated and "
- "scheduled for removal in Python {remove}")
- warnings._deprecated("pathlib.PurePath.relative_to(*args)", msg,
- remove=(3, 14))
+ "scheduled for removal in Python 3.14")
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
other = self.with_segments(other, *_deprecated)
elif not isinstance(other, PurePathBase):
other = self.with_segments(other)
@@ -419,9 +418,8 @@ class PurePathBase:
if _deprecated:
msg = ("support for supplying more than one argument to "
"pathlib.PurePath.is_relative_to() is deprecated and "
- "scheduled for removal in Python {remove}")
- warnings._deprecated("pathlib.PurePath.is_relative_to(*args)",
- msg, remove=(3, 14))
+ "scheduled for removal in Python 3.14")
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
other = self.with_segments(other, *_deprecated)
elif not isinstance(other, PurePathBase):
other = self.with_segments(other)