This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author LimaAlphaHotel
Recipients LimaAlphaHotel, remi.lapeyre
Date 2020-06-19.08:42:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592556163.4.0.695078101911.issue41026@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-06-19 08:42:43LimaAlphaHotelsetrecipients: + LimaAlphaHotel, remi.lapeyre
2020-06-19 08:42:43LimaAlphaHotelsetmessageid: <1592556163.4.0.695078101911.issue41026@roundup.psfhosted.org>
2020-06-19 08:42:43LimaAlphaHotellinkissue41026 messages
2020-06-19 08:42:43LimaAlphaHotelcreate