SIGN IN SIGN UP

bpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)

It fixes the "Text File Busy" OSError when using 'rmtree' on a
windows-managed filesystem in via the VirtualBox shared folder
(and possible other scenarios like a windows-managed network file
system).
(cherry picked from commit b77158b4da449ec5b8f682816a79d004fd65ed07)

Co-authored-by: Lital Natan <litaln@gmail.com>
M
Miss Islington (bot) committed
95d6271f1997580f8cb8a2985d0cd48af912763f
Parent: a2e13ec
Committed by GitHub <noreply@github.com> on 2/21/2022, 8:07:46 AM