-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-89727: Fix os.fwalk RecursionError on deep trees #100347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 23 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
d9f6f44
fix os.walk RecursionError on deep trees
jonburdo 61b8078
use _WalkAction enum
jonburdo d5e2042
Merge branch 'main' into iterative-os-fwalk
jonburdo 90c123b
fix formatting
jonburdo 570818b
remove enum from os
jonburdo 30aeed7
add blurb
jonburdo 55e17b8
gh-89727: Fix os.walk RecursionError on deep trees (#99803)
jonburdo f41cef6
gh-69929: re docs: Add more specific definition of \w (#92015)
slateny 33ba6a5
gh-89051: Add ssl.OP_LEGACY_SERVER_CONNECT (#93927)
graingert f9b6796
gh-88211: Change lower-case and upper-case to match recommendations i…
tbwolfe 77d160f
gh-100348: Fix ref cycle in `asyncio._SelectorSocketTransport` with `…
rkojedzinszky db820a2
gh-99925: Fix inconsistency in `json.dumps()` error messages (GH-99926)
fnesveda c39ce63
Clarify that every thread has its own default context in contextvars …
pablogsal 8d2befb
run test_walk_above_recursion_limit for fwalk
jonburdo d29188e
set stack outside try-except in fwalk
jonburdo 2cf7550
fix comments
jonburdo f2cca94
Merge branch 'main' into iterative-os-fwalk
jonburdo af18a1d
change ValueError to AssertionError
jonburdo 9eedf9a
Merge branch 'main' into iterative-os-fwalk
jonburdo 5ee50c6
add more reliable file descriptor closing logic in os.fwalk
jonburdo f0f9330
use a separate fd_stack for simpler cleanup and error handling
jonburdo ccfb955
Merge branch 'main' into iterative-os-fwalk
jonburdo 598bdf9
run test_walk_above_recursion_limit with fwalk tests
jonburdo c158be3
Merge branch 'main' into iterative-os-fwalk
jonburdo 6608a6a
make sure we don't close the same fd twice
jonburdo d026146
revert to using a single stack instead of a separate ffd stack
jonburdo 762c03a
remove unused variable
jonburdo 045fd88
get rid of unnecessary os._fwalk
jonburdo f3f793a
change except clause to finally clause in os.fwalk
jonburdo dfb9685
Merge branch 'main' into iterative-os-fwalk
AlexWaygood 0ebc475
Merge branch 'main' into iterative-os-fwalk
erlend-aasland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2022-12-20-09-36-29.gh-issue-89727.FpprK3.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Fix issue with :func:`os.fwalk` where a :exc:`RecursionError` would occur on | ||
deep directory structures by adjusting the implementation to be iterative | ||
instead of recursive. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.