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.

classification
Title: Support the fspath protocol in the posixpath module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: out of date
Dependencies: 27232 Superseder:
Assigned To: JelleZijlstra Nosy List: JelleZijlstra, SilentGhost, berker.peksag, ethan.furman
Priority: normal Keywords: patch

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 issue27232. 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:32adminsetgithub: 71418
2016-10-06 11:17:16berker.peksagsetstatus: open -> closed

type: enhancement

nosy: + berker.peksag
messages: + msg278185
resolution: out of date
stage: resolved
2016-06-06 14:02:31JelleZijlstrasetdependencies: + os.fspath() should not use repr() on error
messages: + msg267531
2016-06-06 06:30:07SilentGhostsetnosy: + SilentGhost
messages: + msg267518
2016-06-05 17:45:53JelleZijlstrasetfiles: + issue27231.patch
keywords: + patch
messages: + msg267444
2016-06-05 16:35:39JelleZijlstracreate