Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove deprecatedis_reserved frompathlib #133875

Closed
Assignees
sobolevn
Labels
@sobolevn

Description

@sobolevn

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

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.

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp