]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
pathlib ABCs: drop partial, broken, untested support for `bytes` paths. (#114777)
authorBarney Gale <barney.gale@gmail.com>
Wed, 31 Jan 2024 00:59:33 +0000 (00:59 +0000)
committerGitHub <noreply@github.com>
Wed, 31 Jan 2024 00:59:33 +0000 (00:59 +0000)
commit574291963f6b0eb7da3fde1ae9763236e7ece306
tree54639605dc0db7b2e69c0b54527ca939a9acaa4d
parent1667c2868633a1091b3519594103ca7662d64d75
pathlib ABCs: drop partial, broken, untested support for `bytes` paths. (#114777)

Methods like `full_match()`, `glob()`, etc, are difficult to make work with
byte paths, and it's not worth the effort. This patch makes `PurePathBase`
raise `TypeError` when given non-`str` path segments.
Lib/pathlib/_abc.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py