Re: [Python-Dev] Backward compatibility of shutil.rmtree

2012-05-20 Thread Hynek Schlawack
Am 20.05.12 23:46, schrieb mar...@v.loewis.de: Two of them differ in the new version: os.fwalk() is used instead of os.listdir() and os.unlinkat() instead of os.remove(). >>> It would be os.flistdir instead of os.listdir, not os.fwalk, right? >> It’s actually os.fwalk. It has been implem

Re: [Python-Dev] Backward compatibility of shutil.rmtree

2012-05-20 Thread martin
Zitat von Hynek Schlawack : Two of them differ in the new version: os.fwalk() is used instead of os.listdir() and os.unlinkat() instead of os.remove(). It would be os.flistdir instead of os.listdir, not os.fwalk, right? It’s actually os.fwalk. It has been implemented by Charles-François as a

Re: [Python-Dev] Backward compatibility of shutil.rmtree

2012-05-20 Thread Hynek Schlawack
>> Two of them differ in the new version: os.fwalk() is used instead of >> os.listdir() and os.unlinkat() instead of os.remove(). > It would be os.flistdir instead of os.listdir, not os.fwalk, right? It’s actually os.fwalk. It has been implemented by Charles-François as a dependency of the ticket

Re: [Python-Dev] Backward compatibility of shutil.rmtree

2012-05-20 Thread Martin v. Löwis
Two of them differ in the new version: os.fwalk() is used instead of os.listdir() and os.unlinkat() instead of os.remove(). It would be os.flistdir instead of os.listdir, not os.fwalk, right? The way this interface is defined, it's IMO best to do "precise" reporting, i.e. pass the exact functio

[Python-Dev] Backward compatibility of shutil.rmtree

2012-05-20 Thread Hynek Schlawack
Hi, as our shutil.rmtree() is vulnerable to symlink attacks (see ) I’ve implemented a safe version using os.fwalk() and os.unlinkat() for Python 3.3. Now we face a problem I’d like a broad opinion on: rmtree has a callback hook called `onerror` that that gets cal