]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-73991: Rework `pathlib.Path.rmtree()` into `delete()` (#122368)
authorBarney Gale <barney.gale@gmail.com>
Wed, 7 Aug 2024 00:34:44 +0000 (01:34 +0100)
committerGitHub <noreply@github.com>
Wed, 7 Aug 2024 00:34:44 +0000 (01:34 +0100)
commit98dba73010e807e613b9400e8c4b411302498728
tree0408bb63f00823340a325c55cb93294e2e1bf96d
parentb5e142ba7c2063efe9bb8065c3b0bad33e2a9afa
GH-73991: Rework `pathlib.Path.rmtree()` into `delete()` (#122368)

Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting
non-directories. This simplifies the interface for users, and nicely
complements the upcoming `move()` and `copy()` methods (which will also
accept any type of file.)
Doc/library/pathlib.rst
Doc/whatsnew/3.14.rst
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py
Misc/NEWS.d/next/Library/2024-05-15-01-21-44.gh-issue-73991.bNDqQN.rst