mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-102828: set stacklevel on deprecation warning (#103422)
This commit is contained in:
parent
4cd1cc843a
commit
8026cda10c
1 changed files with 1 additions and 1 deletions
|
|
@ -699,7 +699,7 @@ def rmtree(path, ignore_errors=False, onerror=None, *, onexc=None, dir_fd=None):
|
|||
|
||||
if onerror is not None:
|
||||
warnings.warn("onerror argument is deprecated, use onexc instead",
|
||||
DeprecationWarning)
|
||||
DeprecationWarning, stacklevel=2)
|
||||
|
||||
sys.audit("shutil.rmtree", path, dir_fd)
|
||||
if ignore_errors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue