GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove deprecated `is_reserved` from `pathlib` · Issue #133875 · python/cpython

Remove deprecated is_reserved from pathlib #133875

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove deprecated is_reserved from pathlib#133875
Copy link
Assignees
sobolevn
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-featureA feature request or enhancementA feature request or enhancement

Description

@sobolevn
sobolevn
opened on May 11, 2025
Issue body actions

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 in 9b9cdb6

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

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

Activity

  1. sobolevn
    self-assigned this
    on May 11, 2025
  2. sobolevn
    added
    type-featureA feature request or enhancementA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    topic-pathlib
    on May 11, 2025
  3. sobolevn
    added a commit that references this issue on May 11, 2025

    pythongh-133875: Remove deprecated `pathlib.PurePath.is_reserved`

    09b3e24
  4. sobolevn
    added a commit that references this issue on Jul 19, 2025

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

    67036f1
  5. sobolevn
    closed this as completedon Jul 19, 2025
  6. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-133875: Remove deprecated `pathlib.PurePath.is_reserved` (py…

    88cd5f8
  7. Agent-Hellboy
    added a commit that references this issue on Aug 19, 2025

    pythongh-133875: Remove deprecated `pathlib.PurePath.is_reserved` (py…

    84b2c20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.