Message371853
Hi Rémi,
I understand why it is the case, I just thought it would be a nice enhancement and quick win to add the support.
RE "you should use os.fspath() instead of str()": I'm following in the pathlib docuementation (https://docs.python.org/3/library/pathlib.html):
> The string representation of a path is the raw filesystem path itself (in native form, e.g. with backslashes under Windows), which you can pass to any function taking a file path as a string:
> >>>
> >>> p = PurePath('/etc')
> >>> str(p)
> '/etc'
> >>> p = PureWindowsPath('c:/Program Files')
> >>> str(p)
> 'c:\\Program Files'
Is the pathlib documentation wrong/out-of-date? I Googled your suggestion of `os.fspath` and found <https://www.python.org/dev/peps/pep-0519/> which reads like the pathlib docs need correcting?
I'm trying to setup a build environment to create a PR for this issue as I type...
Thanks,
Laurence |
|
Date |
User |
Action |
Args |
2020-06-19 08:42:43 | LimaAlphaHotel | set | recipients:
+ LimaAlphaHotel, remi.lapeyre |
2020-06-19 08:42:43 | LimaAlphaHotel | set | messageid: <1592556163.4.0.695078101911.issue41026@roundup.psfhosted.org> |
2020-06-19 08:42:43 | LimaAlphaHotel | link | issue41026 messages |
2020-06-19 08:42:43 | LimaAlphaHotel | create | |
|