FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[WIP] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees. by barneygale · Pull Request #103164 · python/cpython · GitHub

/ cpython Public

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

Closed
barneygale wants to merge 27 commits into
python:mainfrom
barneygale:pathlib-fwalk
Closed

[WIP] GH-89727: Fix shutil.rmtree() recursion error on deep trees.#103164
barneygale wants to merge 27 commits into
python:mainfrom
barneygale:pathlib-fwalk

Conversation

barneygale commented Apr 1, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

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()`.
Comment thread Lib/shutil.py

Copy link
Copy Markdown
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 closed this Nov 22, 2023
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
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


Back | FazBrowse Home | New Git URL