New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undeprecate the onerror argument in shutil.rmtree() #112645
Comments
serhiy-storchaka
added
type-bug
An unexpected behavior, bug, or error
stdlib
Python modules in the Lib dir
3.12
bugs and security fixes
3.13
new features, bugs and security fixes
labels
Dec 3, 2023
We can remove the deprecation warning but leave it deprecated in the docs. |
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Dec 3, 2023
iritkatriel
added a commit
that referenced
this issue
Dec 3, 2023
Thank you @iritkatriel. Please backport this change to 3.12. |
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Dec 3, 2023
…til.rmtree (python#112659) (cherry picked from commit 97857ac)
iritkatriel
added a commit
that referenced
this issue
Dec 3, 2023
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
A new
onexc
parameter was added inshutil.rmtree()
in 3.12 (see #102828). At the same time passing theonerror
argument was deprecated. It creates inconvenience for code that should run on several Python versions. It forces users to modify their working code to avoid deprecation warnings.I think that there was nothing wrong in
onerror
. The only advantage ofonexc
overonerror
was that it may require to write less code in some cases, but the deprecation causes an opposite effect -- it requires to write more code.So I think that the deprecation should be reverted.
@iritkatriel
Linked PRs
The text was updated successfully, but these errors were encountered: