mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
gh-119049: Defer import warnings
in pathlib._local
(#119111)
This commit is contained in:
parent
447edb6e98
commit
31a28cbae0
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,6 @@ import operator
|
|||
import os
|
||||
import posixpath
|
||||
import sys
|
||||
import warnings
|
||||
from glob import _StringGlobber
|
||||
from itertools import chain
|
||||
from _collections_abc import Sequence
|
||||
|
@ -405,6 +404,7 @@ class PurePath(PurePathBase):
|
|||
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.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue