Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-102850: set stacklevel on deprecation warning
  • Loading branch information
iritkatriel committed Apr 10, 2023
commit 6a4bfb5282bbef49e4201fd318f50ee95ab4d785
2 changes: 1 addition & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down