Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
It was deprecated in 3.13:
*:mod:`pathlib`: * Deprecate:meth:`.PurePath.is_reserved`, to be removed in Python 3.15. Use:func:`os.path.isreserved` to detect reserved paths on Windows. (Contributed by Barney Gale in:gh:`88569`.)
cpython/Lib/pathlib/__init__.py
Lines 521 to 531 in9b9cdb6
| defis_reserved(self): | |
| """Return True if the path contains one of the special names reserved | |
| by the system, if any.""" | |
| importwarnings | |
| 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)) | |
| ifself.parserisntpath: | |
| returnself.parser.isreserved(self) | |
| returnFalse |
I have a PR ready.