]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89727: Fix os.walk RecursionError on deep trees (#99803)
authorJon Burdo <jon@jonburdo.com>
Mon, 19 Dec 2022 18:59:01 +0000 (13:59 -0500)
committerGitHub <noreply@github.com>
Mon, 19 Dec 2022 18:59:01 +0000 (10:59 -0800)
commit797edb28c3dd02a5727f0374e937e906a389ab77
treeee1150ec0127c660ec8074fc9d7ba99241d41e51
parent702a5bc4637c82dc011e98b84f0cede98eb08dda
gh-89727: Fix os.walk RecursionError on deep trees (#99803)

Use a stack to implement os.walk iteratively instead of recursively to
avoid hitting recursion limits on deeply nested trees.
Lib/os.py
Lib/test/support/__init__.py
Lib/test/test_os.py
Misc/NEWS.d/next/Library/2022-11-29-20-44-54.gh-issue-89727.UJZjkk.rst [new file with mode: 0644]