FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove deprecated `is_reserved` from `pathlib` · Issue #133875 · python/cpython · GitHub

Repository navigation

Remove deprecated is_reserved from pathlib #133875

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`.)

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

I have a PR ready.

Linked PRs

Activity

  1. self-assigned this
    on May 11, 2025
  2. added
    type-featureA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directory
    on May 11, 2025
  3. added a commit that references this issue on May 11, 2025
  4. added a commit that references this issue on Jul 19, 2025
  5. added a commit that references this issue on Aug 4, 2025
  6. added a commit that references this issue on Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytopic-pathlibtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL