[issue35942] posixmodule.c:path_converter() returns an invalid exception message for broken PathLike objects

Serhiy Storchaka report at bugs.python.org
Sun Feb 17 01:39:18 EST 2019


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The custom `__fspath__()` handling is used in `path_converter` for better error reporting. The error message can include names of the function and the argument. PyOS_FSPath() can not provides this information.

I agree that error reporting about incorrect type of the __fspath__() result should be improved.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35942>
_______________________________________


More information about the Python-bugs-list mailing list