]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
pathlib ABCs: Require one or more initialiser arguments (#113885)
authorBarney Gale <barney.gale@gmail.com>
Wed, 10 Jan 2024 01:12:58 +0000 (01:12 +0000)
committerGitHub <noreply@github.com>
Wed, 10 Jan 2024 01:12:58 +0000 (01:12 +0000)
commit5d8a3e74b51a59752f24cb869e7daa065b673f83
tree8504e1f5ee9e1f5b5a1efd7e602f7b08365c4bb2
parentbeb80d11ec0ddaf00a97f8a38ec9eae68e07c28e
pathlib ABCs: Require one or more initialiser arguments (#113885)

Refuse to guess what a user means when they initialise a pathlib ABC
without any positional arguments. In mainline pathlib it's normalised to
`.`, but in the ABCs this guess isn't appropriate; for example, the path
type may not represent the current directory as `.`, or may have no concept
of a "current directory" at all.
Lib/pathlib/_abc.py
Lib/test/test_pathlib/test_pathlib_abc.py