GH-89727: Fix FD leak on `os.fwalk()` generator finalization. by barneygale · Pull Request #119766 · python/cpython · GitHub

github.com

Tin mới

barneygale:gh-89727-os-fwalk-finalization

miss-islington-app

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Change shutil.rmtree and os.walk to support very deep hierarchies #89727

GH-89727: Fix FD leak on `os.fwalk()` generator finalization. Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when the `os.fwalk()` generator is finalized.

needs backport to 3.12

needs backport to 3.13

awaiting core review

View reviewed changes

generator finalization. (

generator finalization. (

bedevere-app Bot commented May 30, 2024
bedevere-app Bot commented May 30, 2024

bedevere-app Bot commented May 30, 2024

GH-119767 is a backport of this pull request to the 3.13 branch.

generator finalization. (

generator finalization. (

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.

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.