[New-bugs-announce] [issue38499] Add rmtree() to pathlib.Path

Alori report at bugs.python.org
Wed Oct 16 09:55:57 EDT 2019


New submission from Alori <valorien at gmail.com>:

pathlib.Path supports deletion of both files (Path.unlink()) and directories (Path.rmdir()).

Unfortunately, Path.rmdir() does not allow deletion of non-empty directories which means users must use shutil.rmtree() when deleting such paths.

Since pathlib.Path already supports file and (empty) directory deletion, adding Path.rmtree(missing_ok=False) would support both the utility and the completeness of pathlib.

----------
components: Library (Lib)
messages: 354799
nosy: valorien
priority: normal
severity: normal
status: open
title: Add rmtree() to pathlib.Path
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38499>
_______________________________________


More information about the New-bugs-announce mailing list