Message401754
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__(self) -> Union[str, bytes]:). However, if an object implementing os.PathLike[bytes] is passed as a dir argument, a TypeError is raised. This bug occurs because the tempfile._infer_return_type function considers all objects other than bytes as str type. |
|
Date |
User |
Action |
Args |
2021-09-14 05:44:04 | rekyungmin | set | recipients:
+ rekyungmin |
2021-09-14 05:44:04 | rekyungmin | set | messageid: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org> |
2021-09-14 05:44:04 | rekyungmin | link | issue45192 messages |
2021-09-14 05:44:03 | rekyungmin | create | |
|