Serhiy Storchaka added the comment:
It works as documented.
https://docs.python.org/3/library/os.html#os.fspath
https://www.python.org/dev/peps/pep-0519/
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
New submission from Joseph Martinot-Lagarde :
os.fspath() returns its argument if it is a str. That means that it bypasses
__fspath__ for str subclasses.
This is the case for the library path.py for example.
This is a corner case that was discovered while trying to fix
https://github.com/matp