Message291130
There's a known issue with `shutil.rmtree` on Windows, in that it fails intermittently.
The issue is well known (https://mail.python.org/pipermail/python-dev/2013-September/128353.html), and the agreement is that it cannot be cleanly solved inside `shutil` and should instead be solved by the calling app. Specifically, python devs themselves faced it in their test suite and solved it by retrying delete.
However, what to do about `tempfile.TemporaryDirectory`? Is it considered the calling app, and therefore should retry delete when it calls `shutil.rmtree` in its `cleanup` method?
I don't think `tempfile` is protected by the same argument that `shutil.rmtree` is protected, in that it's too messy to solve it in the standard library. My rationale is that while it's very easy for the end user to retry `shutil.rmtree`, it's far more difficult to fix the problem with `tempfile.TempDirectory` not deleting itself - how would the end user retry the `cleanup` method (which is called from `weakref.finalizer`)?
So perhaps the retry loop should be added to `cleanup`. |
|
Date |
User |
Action |
Args |
2017-04-04 18:26:18 | max | set | recipients:
+ max |
2017-04-04 18:26:18 | max | set | messageid: <1491330378.49.0.274398190766.issue29982@psf.upfronthosting.co.za> |
2017-04-04 18:26:18 | max | link | issue29982 messages |
2017-04-04 18:26:18 | max | create | |
|