You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support the fspath protocol in the posixpath module #71418
bpo-27232: os.fspath() should not use repr() on error
Files
issue27231.patch: patch adding os.fspath support to numerous posixpath.py functions
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/JelleZijlstra'closed_at=<Date2016-10-06.11:17:16.691>created_at=<Date2016-06-05.16:35:39.581>labels= ['type-feature', 'library']
title='Support the fspath protocol in the posixpath module'updated_at=<Date2016-10-06.11:17:16.689>user='https://github.com/JelleZijlstra'
This patch adds a number of os.fspath calls to the posixpath.py module. I didn't duplicate all tests to check PathLike objects in addition str/bytes, because that seemed excessive. Instead I tried to ensure that each function has at least one test checking that it accepts PathLike objects.
SilentGhost commented on Jun 6, 2016
SilentGhostmannequin
Mannequin
More actions
There seems to be an issue with your patch, it does apply cleanly when doing that manually, but Rietveld doesn't like it. The changes in Lib/posixpath.py and Lib/test/test_posixpath.py don't show up.
Activity
JelleZijlstra commentedon Jun 5, 2016
Various functions in posixpath.py need to accept os.PathLike objects. I will submit a patch.
JelleZijlstra commentedon Jun 5, 2016
This patch adds a number of os.fspath calls to the posixpath.py module. I didn't duplicate all tests to check PathLike objects in addition str/bytes, because that seemed excessive. Instead I tried to ensure that each function has at least one test checking that it accepts PathLike objects.
SilentGhost commentedon Jun 6, 2016
There seems to be an issue with your patch, it does apply cleanly when doing that manually, but Rietveld doesn't like it. The changes in Lib/posixpath.py and Lib/test/test_posixpath.py don't show up.
JelleZijlstra commentedon Jun 6, 2016
I wrote the patch assuming that the error messages would be changed in accordance with bpo-27232. Let's put this on hold until that is resolved.
berkerpeksag commentedon Oct 6, 2016
It looks like the fspath protocol support has already been implemented in b64f83d6ff24.