Bug report
A new onexc parameter was added in shutil.rmtree() in 3.12 (see #102828). At the same time passing the onerror 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 of onexc over onerror 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