Change by Kyungmin Lee :
--
keywords: +patch
pull_requests: +26732
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28323
___
Python tracker
<https://bugs.python.org/issu
Kyungmin Lee added the comment:
for example:
```
from typing import Union
class FakePath:
def __init__(self, path):
self.path = path
def __fspath__(self) -> Union[str, bytes]:
return self.path
if __name__ == "__main__":
from tempfile import Tempo
New submission from Kyungmin Lee :
The tempfile module has been updated to accept an object implementing
os.PathLike protocol for path-related parameters as of Python 3.6 (e.g. dir
parameter). An os.PathLike object represents a filesystem path as a str or
bytes object (i.e. def __fspath__