]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (#119766)
authorBarney Gale <barney.gale@gmail.com>
Thu, 30 May 2024 03:45:47 +0000 (04:45 +0100)
committerGitHub <noreply@github.com>
Thu, 30 May 2024 03:45:47 +0000 (03:45 +0000)
commita5fef800d31648d19cecc240a2fa0dc71371753e
tree02e4937a7b7dfa863bde9ef2eaaec2b50d1ad94c
parent3c890b503c740767d0eb9a0e74b47f17a1e69452
GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (#119766)

Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when
the `os.fwalk()` generator is finalized.
Lib/os.py
Lib/test/test_os.py