[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

2019-08-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: There’s too much code out there relying on both args (especially ignore_errors in unit tests) that would break for no real benefit. -- ___ Python tracker

[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

2019-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Passing ignore_errors=True is not the same as catching and silencing OSError outside of the function. In the former case you continue removing other files in the directory even if you can't remove some of them. In the latter case you stop after the first f

[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

2019-08-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't see the point of shifting the burden to the caller. That doesn't make their code smaller, clearer, faster, easier to write, or easier to get right. Also, deprecations almost always cause pain so we try to avoid them unless the feature is actual

[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

2019-08-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +giampaolo.rodola, serhiy.storchaka, tarek ___ Python tracker ___ ___ Python-bugs-list

[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

2019-08-08 Thread Marco Sulla
New submission from Marco Sulla : I propose to mark as deprecated the parameters `ignore_errors` and `onerror` of `shutil.rmtree()`, and raise a warning if used. The reason is I feel them unpythonic. For emulating `ignore_errors=True`, the code can be written simply with a `try-except` that p

[issue37791] Propose to deprecate ignore_errors,

2019-08-08 Thread Marco Sulla
Change by Marco Sulla : -- nosy: Marco Sulla priority: normal severity: normal status: open title: Propose to deprecate ignore_errors, ___ Python tracker ___ __