[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

Brett Cannon report at bugs.python.org
Thu Nov 21 14:45:15 EST 2019


Brett Cannon <brett at python.org> added the comment:

I can't reproduce in Python 3.8.0:

>>> import os
>>> class A(os.PathLike): pass
...
>>> class B:
...     def __fspath__(self): pass
...
>>> issubclass(B, A)
True

Did you check against an older version of Python?

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list