Anthony Sottile <asott...@umich.edu> added the comment:
one example is here: https://github.com/pre-commit/pre-commit/blob/bb6f1efe63c168d9393d520bd60e16c991a57059/pre_commit/store.py#L137-L139 where I would want cleanup in the exceptional case another (related but different) closed-source use case involves creating a temporary directory that may be deleted and currently has to be guarded by: shutil.rmtree(..., ignore_errors=True) (making `TemporaryDirectory` not useful since it crashes if the directory goes missing) there's additionally the problem of readonly files on windows, and readonly directories elsewhere being undeletable without a custom rmtree but I think that's a different issue entirely -- https://github.com/pre-commit/pre-commit/blob/bb6f1efe63c168d9393d520bd60e16c991a57059/pre_commit/util.py#L250-L267 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue25024> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com