mirror of
https://github.com/python/cpython.git
synced 2025-08-11 12:29:34 +00:00
[3.12] gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659) (#112665)
gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659)
(cherry picked from commit 97857ac058
)
This commit is contained in:
parent
b3b2706cad
commit
f5965c2385
4 changed files with 9 additions and 18 deletions
|
@ -722,10 +722,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:
|
||||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue