[issue27493] logging module fails with unclear error when supplied a (Posix)Path

Vinay Sajip report at bugs.python.org
Thu Jul 21 13:49:17 EDT 2016


Vinay Sajip added the comment:

> the answer would be "not at all".

Not sure about that. If all logging did were to pass the path to lower levels such as open or abspath, that may be true. However, some handlers do path computations (e.g. the rotating file handlers) and so logging would need to have a minimal awareness of PEP 519 or else call str() on any putative filename passed in, and be completely unaware of it (assuming that str() on a Path would return the same as __fspath__().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27493>
_______________________________________


More information about the Python-bugs-list mailing list