Author tarek
Recipients r.david.murray, rubenlm, tarek
Date 2010-04-29.14:11:24
SpamBayes Score 0.000363275
Marked as misclassified No
Message-id <1272550287.4.0.257254435171.issue8523@psf.upfronthosting.co.za>
In-reply-to
Content
> Well, I don't think removing the current onerror support is a viable 
> option for backward compatibility reasons, 
> so we might as well fix it.  

The options could be deprecated since the new behavior would *return* errors.

> Do you have some use cases in mind, Tarek?

What I have in mind is robustness and simplicity: 

robustness because rmtree() will stop calling third party code that can possibly fail and blow the whole process, while working at removing the tree. 

Simplicity because, if it fails at removing some files using the usual os.* APIs, it will just return these errors.

Having this two phases-process will ensure that rmtree() did all that was possible to remove files.

And as I said previously, I am curious to know what is going to be done in the onerror() function when something fails in rmtree(). I doubt any third-party code will do better.

This statement "I couldn't copy this file, try it yourself" seems doomed to complexity.

If the only use case for onerror() is to silent failures, returning these failures seem quite enough. Ala smtp when you get back a list of mails that couldn't be send: it doesn't ask you to send them by yourself, just informs you.

Now maybe we do miss some APIs to check for a file tree sanity, like:

- are the permissions the same throughout the tree ?
- is there any link that will make rmtree() fail ? 
- etc/
History
Date User Action Args
2010-04-29 14:11:27tareksetrecipients: + tarek, r.david.murray, rubenlm
2010-04-29 14:11:27tareksetmessageid: <1272550287.4.0.257254435171.issue8523@psf.upfronthosting.co.za>
2010-04-29 14:11:25tareklinkissue8523 messages
2010-04-29 14:11:24tarekcreate