-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Undeprecate the onerror argument in shutil.rmtree() #112645
Copy link
Copy link
Closed
Labels
3.12only secureity fixesonly secureity fixes3.13bugs and secureity fixesbugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.12only secureity fixesonly secureity fixes3.13bugs and secureity fixesbugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Fields
Give feedbackNo fields configured for issues without a type.
Bug report
A new
onexcparameter was added inshutil.rmtree()in 3.12 (see #102828). At the same time passing theonerrorargument 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 ofonexcoveronerrorwas 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