]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-103525: Improve exception message from `pathlib.PurePath()` (GH-103526)
authorBarney Gale <barney.gale@gmail.com>
Tue, 2 May 2023 18:08:19 +0000 (19:08 +0100)
committerGitHub <noreply@github.com>
Tue, 2 May 2023 18:08:19 +0000 (19:08 +0100)
commit8611e7bf5ceace998fefcbf26ab1c5d5bc8a0e2a
treec06a1f5421944184eb75ccd604ee855aae093c26
parentd81ca7ec029ba05084751c8df64292bb48f4f30f
GH-103525: Improve exception message from `pathlib.PurePath()` (GH-103526)

Check that arguments are strings before calling `os.path.join()`.

Also improve performance of `PurePath(PurePath(...))` while we're in the
area: we now use the *unnormalized* string path of such arguments.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/pathlib.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-04-13-19-43-15.gh-issue-103525.uY4VYg.rst [new file with mode: 0644]