Skip to content
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

[WIP] GH-89727: Fix shutil.rmtree() recursion error on deep trees. #103164

Closed
wants to merge 27 commits into from

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Apr 1, 2023

Add a follow_junctions argument to pathlib.Path.walk(). When set to false, directory junctions are treated as files.

Add an _fwalk() method to pathlib.Path, similar to os.fwalk() except in its treatment of symlinks.

(This method could be made public in future if desired).

Implement shutil.rmtree() using pathlib.Path.walk() or _fwalk().

Add a `follow_junctions` argument to `pathlib.Path.walk()`. When set to
false, directory junctions are treated as files.

Add an `fwalk()` method to `pathlib.Path`, analogous to `os.fwalk()`.

Implement `shutil.rmtree()` using `pathlib.Path.walk()` and `fwalk()`.
@barneygale
Copy link
Contributor Author

Withdrawing this PR - it's out of date, and I'd like to keep the Path API stable until PathBase is made public (see #110109)

@barneygale barneygale closed this Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants