mirror of
https://github.com/python/cpython.git
synced 2025-12-20 23:51:24 +00:00
gh-133875: Remove deprecated pathlib.PurePath.is_reserved (#133876)
This commit is contained in:
parent
7ae4749d06
commit
67036f1ee1
9 changed files with 15 additions and 36 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue