Issue 27231: Support the fspath protocol in the posixpath module (original) (raw)

Created on 2016-06-05 16:35 by JelleZijlstra, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue27231.patch JelleZijlstra,2016-06-05 17:45 patch adding os.fspath support to numerous posixpath.py functions review
Messages (5)
msg267428 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2016-06-05 16:35
Various functions in posixpath.py need to accept os.PathLike objects. I will submit a patch.
msg267444 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2016-06-05 17:45
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.
msg267518 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-06-06 06:30
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.
msg267531 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2016-06-06 14:02
I wrote the patch assuming that the error messages would be changed in accordance with . Let's put this on hold until that is resolved.
msg278185 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-10-06 11:17
It looks like the fspath protocol support has already been implemented in b64f83d6ff24.
History
Date User Action Args
2022-04-11 14:58:32 admin set github: 71418
2016-10-06 11:17:16 berker.peksag set status: open -> closedtype: enhancementnosy: + berker.peksagmessages: + resolution: out of datestage: resolved
2016-06-06 14:02:31 JelleZijlstra set dependencies: + os.fspath() should not use repr() on errormessages: +
2016-06-06 06:30:07 SilentGhost set nosy: + SilentGhostmessages: +
2016-06-05 17:45:53 JelleZijlstra set files: + issue27231.patchkeywords: + patchmessages: +
2016-06-05 16:35:39 JelleZijlstra create