diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2023-10-04 05:09:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 05:09:43 (GMT) |
commit | bfe7e72522565f828f43c2591fea84a7981ee048 (patch) | |
tree | c1602e78494734ac325d395f51a74fe55bb8d5c7 /Lib/shutil.py | |
parent | f02f26e29366513b097578fbc6b25e02d0eba7c0 (diff) | |
download | cpython-bfe7e72522565f828f43c2591fea84a7981ee048.zip cpython-bfe7e72522565f828f43c2591fea84a7981ee048.tar.gz cpython-bfe7e72522565f828f43c2591fea84a7981ee048.tar.bz2 |
gh-109653: Defer importing `warnings` in several modules (#110286)
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index a278b74..0fed011 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -10,7 +10,6 @@ import stat import fnmatch import collections import errno -import warnings try: import zlib @@ -723,6 +722,7 @@ def rmtree(path, ignore_errors=False, onerror=None, *, onexc=None, dir_fd=None): """ if onerror is not None: + import warnings warnings.warn("onerror argument is deprecated, use onexc instead", DeprecationWarning, stacklevel=2) |