]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35942: Improve the error message if __fspath__ returns invalid types in path_conv...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 Feb 2019 11:05:52 +0000 (03:05 -0800)
committerGitHub <noreply@github.com>
Mon, 18 Feb 2019 11:05:52 +0000 (03:05 -0800)
commita01065a3588d3f0d0c57ea35107aa97e722fe2b2
treefaaaf96e8a818b47e6bca83e8947603001717b95
parenta7f929db605326da452fbdeebfe341afa9316d25
bpo-35942: Improve the error message if __fspath__ returns invalid types in path_converter (GH-11831)

The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.
(cherry picked from commit 09fbcd6085e18b534fd4161844ff39f77eb4a082)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Lib/test/test_os.py
Misc/NEWS.d/next/Core and Builtins/2019-02-18-09-30-55.bpo-35942.oLhL2v.rst [new file with mode: 0644]
Modules/posixmodule.c