]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) (GH-112764)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 5 Dec 2023 19:25:52 +0000 (20:25 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 19:25:52 +0000 (19:25 +0000)
commit54ca4c64d0d579b8a1dfc7a7ea4f48461eb10073
tree3838f6922eeb71f3c7e93967e3e9626249305629
parent23920a0843f48c4f4be4a31b56ee2e44c058099b
[3.11] bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) (GH-112764)

* Ignore os.close() errors when ignore_errors is True.
* Pass os.close() errors to the error handler if specified.
* os.close no longer retried after error.

(cherry picked from commit 11d88a178b077e42025da538b890db3151a47070)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/shutil.py
Lib/test/test_shutil.py
Misc/NEWS.d/next/Library/2020-12-14-09-31-13.bpo-35332.s22wAx.rst [new file with mode: 0644]