]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) (#119765)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 30 May 2024 03:32:14 +0000 (05:32 +0200)
committerGitHub <noreply@github.com>
Thu, 30 May 2024 03:32:14 +0000 (03:32 +0000)
commitaae371bda47d4c758059264f86a3ed6cbaa15a4a
treee5ca23af3d571ff48515254b5bbf73ba4d5b6c32
parent681d7da144d1471ed5c0a155c838dc4a4a36636d
[3.12] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) (#119765)

GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638)

Implement `os.fwalk()` using a list as a stack to avoid emitting recursion
errors on deeply nested trees.
(cherry picked from commit 3c890b503c740767d0eb9a0e74b47f17a1e69452)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Lib/os.py
Lib/test/test_os.py
Misc/NEWS.d/next/Library/2024-05-28-00-56-59.gh-issue-89727._bxoL3.rst [new file with mode: 0644]