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.

Title: Update os.path for PEP 519/__fspath__()
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: 26027 27184 Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, ethan.furman, ned.deily, python-dev
Priority: release blocker Keywords: patch

Created on 2016-07-15 21:06 by brett.cannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
fspath_tests.diff brett.cannon, 2016-07-15 22:53 review
os_path.diff brett.cannon, 2016-07-29 22:29 Tests and fixes not involving stat or lstat review
Messages (6)
msg270513 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-15 21:06
As per PEP 519, os.path needs to be updated to support __fspath__().
msg270519 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-15 22:53
Here are tests for genericpath, posixpath, and ntpath (which should in the end cover all of os.path).
msg271645 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-29 20:04
Ran into the first nasty snag: people are abusing os.path.commonprefix() and it's extremely generic approach. Instead of passing in a list of file paths they are passing a list of lists of file path *parts*, e.g. instead of ["a/b", "a/c"] they are passing in [["a", "b"], ["a", "c"]]. I have special-cased when the list contains another list or tuple, but I still feel dirty doing it.
msg271654 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-29 22:29
Here is a patch that includes the previous tests as long with fixes which don't involve stat or lstat (once those functions are updated themselves then os.path will be ported).
msg273733 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-08-26 21:45
New changeset b64f83d6ff24 by Brett Cannon in branch 'default':
Issue #26027, #27524: Add PEP 519/__fspath__() support to os and
msg274655 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-06 22:59
New changeset 9be0286772bf by Brett Cannon in branch 'default':
Issue #26027, #27524: Document the support for path-like objects in os and os.path.
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71711
2016-09-06 22:59:12python-devsetmessages: + msg274655
2016-08-26 21:46:15brett.cannonsetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2016-08-26 21:45:25python-devsetnosy: + ned.deily, python-dev
messages: + msg273733
2016-08-05 19:44:45brett.cannonlinkissue27184 superseder
2016-07-29 22:29:23brett.cannonsetfiles: + os_path.diff

messages: + msg271654
2016-07-29 20:04:40brett.cannonsetmessages: + msg271645
2016-07-15 22:53:13brett.cannonsetfiles: + fspath_tests.diff
keywords: + patch
messages: + msg270519

stage: test needed -> needs patch
2016-07-15 22:00:51ethan.furmansetnosy: + ethan.furman
2016-07-15 21:06:56brett.cannonsetdependencies: + Support Path objects in the posix module, Support path objects in the ntpath module
2016-07-15 21:06:32brett.cannoncreate