gh-133875: Remove deprecated pathlib.PurePath.is_reserved (#133876)

This commit is contained in:
sobolevn 2025-07-19 20:07:46 +03:00 committed by GitHub
parent 7ae4749d06
commit 67036f1ee1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 15 additions and 36 deletions

View file

@ -519,18 +519,6 @@ class PurePath:
return False
return self.parser.isabs(self)
def is_reserved(self):
"""Return True if the path contains one of the special names reserved
by the system, if any."""
import warnings
msg = ("pathlib.PurePath.is_reserved() is deprecated and scheduled "
"for removal in Python 3.15. Use os.path.isreserved() to "
"detect reserved paths on Windows.")
warnings._deprecated("pathlib.PurePath.is_reserved", msg, remove=(3, 15))
if self.parser is ntpath:
return self.parser.isreserved(self)
return False
def as_uri(self):
"""Return the path as a URI."""
import warnings