]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) (GH-112763)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 5 Dec 2023 17:38:44 +0000 (18:38 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 17:38:44 +0000 (17:38 +0000)
commite63bb9caf08d7f36372f258efa287e676a161587
treea13a0e1f4ee2d552b3676185382c5543598eaf21
parent5acfb8258afa1ecb445f699585ffbaf7529a640d
[3.12] bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) (GH-112763)

* 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]