]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
pathlib ABCs: raise `UnsupportedOperation` directly. (#114776)
authorBarney Gale <barney.gale@gmail.com>
Wed, 31 Jan 2024 00:38:01 +0000 (00:38 +0000)
committerGitHub <noreply@github.com>
Wed, 31 Jan 2024 00:38:01 +0000 (00:38 +0000)
commit1667c2868633a1091b3519594103ca7662d64d75
tree08b86dc15138b9b2a4fa04c89dbd46c4db5e3d79
parenta06b606462740058b5d52fefdcdcd679d4f40260
pathlib ABCs: raise `UnsupportedOperation` directly. (#114776)

Raise `UnsupportedOperation` directly, rather than via an `_unsupported()`
helper, to give human readers and IDEs/typecheckers/etc a bigger hint that
these methods are abstract.
Lib/pathlib/__init__.py
Lib/pathlib/_abc.py