gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659)

This commit is contained in:
Irit Katriel 2023-12-03 14:02:37 +00:00 committed by GitHub
parent 162d3d428a
commit 97857ac058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 19 deletions

View file

@ -721,11 +721,6 @@ def rmtree(path, ignore_errors=False, onerror=None, *, onexc=None, dir_fd=None):
If both onerror and onexc are set, onerror is ignored and onexc is used.
"""
if onerror is not None:
import warnings
warnings.warn("onerror argument is deprecated, use onexc instead",
DeprecationWarning, stacklevel=2)
sys.audit("shutil.rmtree", path, dir_fd)
if ignore_errors:
def onexc(*args):