[issue33498] pathlib.Path wants an rmtree method

2020-06-14 Thread Charles Machalow
Charles Machalow added the comment: I'm disappointed to see this closed. For new (and old) users, it makes complete sense to have an rmtree method on the Path object itself. If I'm using pathlib, I try not to delegate to os. for file operations, since it also tends to seem more OO and clean

[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed there is no reason to put all useful path informations under the Path class. Writing method calls instead of function calls is not an ideal. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am against this. shutil provides higher level API than pathlib, and pathlib should not depend on shutil. pathlib.Path represents a path, and its methods usually does involve filesystem operations, or involve just a single filesystem operation.

[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch pull_requests: +11040, 11041 stage: -> patch review ___ Python tracker ___

[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch pull_requests: +11040, 11041, 11042 stage: -> patch review ___ Python tracker ___

[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch, patch pull_requests: +11040, 11041, 11042, 11043 stage: -> patch review ___ Python tracker ___

[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11040 stage: -> patch review ___ Python tracker ___ ___

[issue33498] pathlib.Path wants an rmtree method

2018-09-14 Thread Lukas Röllin
Lukas Röllin added the comment: I definitely would like this too. I have a code base that's only grazing on path usage, and I could completely convert it to pathlib, but one shutil.rmtree still remains... -- nosy: +Dreami ___ Python tracker

[issue33498] pathlib.Path wants an rmtree method

2018-05-15 Thread Aaron Hall
Aaron Hall added the comment: > What is wrong with just using shutil.rmtree()? 0. It's awkward to import just for demonstrations. 1. It's harder for new pythonists to discover. 2. A method provides discoverability in an object's namespace. 3. rmtree is a method of paths

[issue33498] pathlib.Path wants an rmtree method

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is wrong with just using shutil.rmtree()? You can't deal with files with only using pathlib. You can't read ZIP archives, open temporary files, import modules, download files from Internet and open them in the webbrowser,

[issue33498] pathlib.Path wants an rmtree method

2018-05-14 Thread Aaron Hall
New submission from Aaron Hall : pathlib.Path wants the rmtree method from shutil I think we need this method for a couple of reasons. 1. in shell, rm has the -r flag - In Python, we use shutil.rmtree as a best practice for this. 2. I prefer to teach my students about