René's URL Explorer Experiment


Title: gh-89727: Fix os.fwalk RecursionError on deep trees by jonburdo · Pull Request #100347 · python/cpython · GitHub

Open Graph Title: gh-89727: Fix os.fwalk RecursionError on deep trees by jonburdo · Pull Request #100347 · python/cpython

X Title: gh-89727: Fix os.fwalk RecursionError on deep trees by jonburdo · Pull Request #100347 · python/cpython

Description: Use a stack to implement os.fwalk iteratively instead of recursively to avoid hitting recursion limits on deeply nested trees. Similar to how this is done for os.walk in #99803 Issue: gh-89727

Open Graph Description: Use a stack to implement os.fwalk iteratively instead of recursively to avoid hitting recursion limits on deeply nested trees. Similar to how this is done for os.walk in #99803 Issue: gh-89727

X Description: Use a stack to implement os.fwalk iteratively instead of recursively to avoid hitting recursion limits on deeply nested trees. Similar to how this is done for os.walk in #99803 Issue: gh-89727

Opengraph URL: https://github.com/python/cpython/pull/100347

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:febfb798-78d5-0773-f899-28eaf7caf212
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD4D2:2839F:116F9AA:1744D59:6969A9CD
html-safe-nonce5438877dd34af506bb99833b741d00edabeb33f6d591eb9b765af72222da2630
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEQyOjI4MzlGOjExNkY5QUE6MTc0NEQ1OTo2OTY5QTlDRCIsInZpc2l0b3JfaWQiOiIxMjg0NDg5MjIyMzczODc4MjIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac16061872cbfafc8f46254ace0f52440a8207f6c007d6ad8d55857289e2e37ddf
hovercard-subject-tagpull_request:1170961693
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/100347/files
twitter:imagehttps://avatars.githubusercontent.com/u/79213343?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/79213343?s=400&v=4
og:image:altUse a stack to implement os.fwalk iteratively instead of recursively to avoid hitting recursion limits on deeply nested trees. Similar to how this is done for os.walk in #99803 Issue: gh-89727
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release124667f43168afb6c9c03b7c02eb5b1d2e1be3d9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/100347/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F100347%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F100347%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/100347/files
Reloadhttps://github.com/python/cpython/pull/100347/files
Reloadhttps://github.com/python/cpython/pull/100347/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/100347/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/100347/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
jonburdohttps://github.com/jonburdo
python:mainhttps://github.com/python/cpython/tree/main
jonburdo:iterative-os-fwalkhttps://github.com/jonburdo/cpython/tree/iterative-os-fwalk
Conversation 22 https://github.com/python/cpython/pull/100347
Commits 31 https://github.com/python/cpython/pull/100347/commits
Checks 0 https://github.com/python/cpython/pull/100347/checks
Files changed https://github.com/python/cpython/pull/100347/files
Please reload this pagehttps://github.com/python/cpython/pull/100347/files
gh-89727: Fix os.fwalk RecursionError on deep trees https://github.com/python/cpython/pull/100347/files#top
Show all changes 31 commits https://github.com/python/cpython/pull/100347/files
d9f6f44 fix os.walk RecursionError on deep trees jonburdo Dec 19, 2022 https://github.com/python/cpython/pull/100347/commits/d9f6f44f009282d12d1a8eb1dc480d0300bf537e
61b8078 use _WalkAction enum jonburdo Dec 19, 2022 https://github.com/python/cpython/pull/100347/commits/61b8078a37a014d070b99fb9bfcfebb21b2f38ca
d5e2042 Merge branch 'main' into iterative-os-fwalk jonburdo Dec 19, 2022 https://github.com/python/cpython/pull/100347/commits/d5e20420ae196b00bf45897a330984950ed38015
90c123b fix formatting jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/90c123ba387c65d044cd33db7d6e92f54f8f7f91
570818b remove enum from os jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/570818b0cf609935787431ed7e0b7cdc0f8d1f88
30aeed7 add blurb jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/30aeed7fc6945e57946f6c7708546f04fcec7f04
55e17b8 gh-89727: Fix os.walk RecursionError on deep trees (#99803) jonburdo Dec 19, 2022 https://github.com/python/cpython/pull/100347/commits/55e17b83551db9414bd5418f577351333ff6292b
f41cef6 gh-69929: re docs: Add more specific definition of \w (#92015) slateny Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/f41cef6705dd62bebd02505a671acefab949016c
33ba6a5 gh-89051: Add ssl.OP_LEGACY_SERVER_CONNECT (#93927) graingert Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/33ba6a5800628af22fa7ecf00fc5601296849a10
f9b6796 gh-88211: Change lower-case and upper-case to match recommendations i… tbwolfe Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/f9b6796728684e242c795b23c0c8b04dedd7cbc1
77d160f gh-100348: Fix ref cycle in `asyncio._SelectorSocketTransport` with `… rkojedzinszky Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/77d160fee528fa7666497ff35fa6b2e51675bf55
db820a2 gh-99925: Fix inconsistency in `json.dumps()` error messages (GH-99926) fnesveda Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/db820a20070359f93181471c553f07a743876829
c39ce63 Clarify that every thread has its own default context in contextvars … pablogsal Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/c39ce6305ede472a412ba52c276fdb1074e1bdc9
8d2befb run test_walk_above_recursion_limit for fwalk jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/8d2befbf48064809cafbfa762b33e45c02fe57b2
d29188e set stack outside try-except in fwalk jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/d29188e8fea033757b6ee8b4ae62ed7760c7c207
2cf7550 fix comments jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/2cf7550aeb8de8a837e4ecf80e363e62ccba0ec5
f2cca94 Merge branch 'main' into iterative-os-fwalk jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/f2cca949d32eeb97bb7d28e277d844ae26b22d09
af18a1d change ValueError to AssertionError jonburdo Dec 20, 2022 https://github.com/python/cpython/pull/100347/commits/af18a1d882aeaac006b7d2eb9e077cd0f4548f8b
9eedf9a Merge branch 'main' into iterative-os-fwalk jonburdo Mar 23, 2023 https://github.com/python/cpython/pull/100347/commits/9eedf9a8cc0298d367f62803985fec3b0b648e71
5ee50c6 add more reliable file descriptor closing logic in os.fwalk jonburdo Mar 23, 2023 https://github.com/python/cpython/pull/100347/commits/5ee50c6d0c9b63f934cd4af49097beccea426cda
f0f9330 use a separate fd_stack for simpler cleanup and error handling jonburdo Mar 23, 2023 https://github.com/python/cpython/pull/100347/commits/f0f9330f4c2a6bbb24957002f1442ca135022c37
ccfb955 Merge branch 'main' into iterative-os-fwalk jonburdo Mar 23, 2023 https://github.com/python/cpython/pull/100347/commits/ccfb955d6fed49c4995f32e67fe5fb111ff04eab
598bdf9 run test_walk_above_recursion_limit with fwalk tests jonburdo Mar 23, 2023 https://github.com/python/cpython/pull/100347/commits/598bdf908ae91783d812edeeb6f1532e134f938a
c158be3 Merge branch 'main' into iterative-os-fwalk jonburdo Mar 24, 2023 https://github.com/python/cpython/pull/100347/commits/c158be3187efc496bfcbf420208888f6a57c9312
6608a6a make sure we don't close the same fd twice jonburdo Mar 26, 2023 https://github.com/python/cpython/pull/100347/commits/6608a6ad3eff2bc8882e66b40f993046453d6bbf
d026146 revert to using a single stack instead of a separate ffd stack jonburdo Mar 26, 2023 https://github.com/python/cpython/pull/100347/commits/d026146a50eef6c2137b2bd9f2e333a83a093e63
762c03a remove unused variable jonburdo Mar 26, 2023 https://github.com/python/cpython/pull/100347/commits/762c03a939a42b2b9776a9230a5e2212deeddb28
045fd88 get rid of unnecessary os._fwalk jonburdo Apr 1, 2023 https://github.com/python/cpython/pull/100347/commits/045fd8878f14226b9b6904ba12784e036f01a0fa
f3f793a change except clause to finally clause in os.fwalk jonburdo Apr 1, 2023 https://github.com/python/cpython/pull/100347/commits/f3f793a48634c1fe6f500e95f5f9bbed69c247e3
dfb9685 Merge branch 'main' into iterative-os-fwalk AlexWaygood Apr 25, 2023 https://github.com/python/cpython/pull/100347/commits/dfb9685db4ff263ca503240dc3dd2e8439db29f8
0ebc475 Merge branch 'main' into iterative-os-fwalk erlend-aasland Jan 5, 2024 https://github.com/python/cpython/pull/100347/commits/0ebc47506321cbb626475eb43c49537e2113ed05
Clear filters https://github.com/python/cpython/pull/100347/files
Please reload this pagehttps://github.com/python/cpython/pull/100347/files
Please reload this pagehttps://github.com/python/cpython/pull/100347/files
os.py https://github.com/python/cpython/pull/100347/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
test_os.py https://github.com/python/cpython/pull/100347/files#diff-5007f0845419916c8b0294481e2ee212ca36661d9843f86338ec42254645edfc
2022-12-20-09-36-29.gh-issue-89727.FpprK3.rst https://github.com/python/cpython/pull/100347/files#diff-424e5756bd43996cab9270d990b4dd84593d6deac64ed98023cbb89ccadc05a5
Lib/os.pyhttps://github.com/python/cpython/pull/100347/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
View file https://github.com/jonburdo/cpython/blob/0ebc47506321cbb626475eb43c49537e2113ed05/Lib/os.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/100347/{{ revealButtonHref }}
https://github.com/python/cpython/pull/100347/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
https://github.com/python/cpython/pull/100347/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
https://github.com/python/cpython/pull/100347/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
https://github.com/python/cpython/pull/100347/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
Lib/test/test_os.pyhttps://github.com/python/cpython/pull/100347/files#diff-5007f0845419916c8b0294481e2ee212ca36661d9843f86338ec42254645edfc
View file https://github.com/jonburdo/cpython/blob/0ebc47506321cbb626475eb43c49537e2113ed05/Lib/test/test_os.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/100347/{{ revealButtonHref }}
https://github.com/python/cpython/pull/100347/files#diff-5007f0845419916c8b0294481e2ee212ca36661d9843f86338ec42254645edfc
https://github.com/python/cpython/pull/100347/files#diff-5007f0845419916c8b0294481e2ee212ca36661d9843f86338ec42254645edfc
Misc/NEWS.d/next/Library/2022-12-20-09-36-29.gh-issue-89727.FpprK3.rsthttps://github.com/python/cpython/pull/100347/files#diff-424e5756bd43996cab9270d990b4dd84593d6deac64ed98023cbb89ccadc05a5
View file https://github.com/jonburdo/cpython/blob/0ebc47506321cbb626475eb43c49537e2113ed05/Misc/NEWS.d/next/Library/2022-12-20-09-36-29.gh-issue-89727.FpprK3.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/100347/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.