]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 30 May 2024 04:40:21 +0000 (06:40 +0200)
committerGitHub <noreply@github.com>
Thu, 30 May 2024 04:40:21 +0000 (04:40 +0000)
commit083bf3ad1795604ee833d1595f2a536b9cd57419
tree7b21acd90198472279cffb68fe26f20c76fad447
parent810a09ad3710be60cff9e174be85ca65e76cdbd1
[3.13] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766) (#119767)

GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766)

Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when
the `os.fwalk()` generator is finalized.
(cherry picked from commit a5fef800d31648d19cecc240a2fa0dc71371753e)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Lib/os.py
Lib/test/test_os.py