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
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=Noneclosed_at=<Date2021-04-07.18:32:57.069>created_at=<Date2020-02-17.00:57:41.837>labels= ['library', '3.9']
title='pathlib calls `os.getcwd()` without using accessor'updated_at=<Date2021-04-07.18:32:57.069>user='https://github.com/barneygale'
Whereas most calls to os functions from pathlib.Path methods happen via pathlib._Accessor methods, retrieving the current working directory does not. This problem occurs when calling the pathlib.Path.cwd(), ~resolve() and ~absolute() methods.
Those methods are non-pure, i.e. part of Path but not PurePath. Only impure paths have accessors. The _Accessor docstring says: "an accessor implements a particular (system-specific or not) way of accessing paths on the filesystem". This abstraction is pretty pointless if covers os.readlink() but not os.getcwd()!
New changeset b05440c by Barney Gale in branch 'master': bpo-39659: Route calls from pathlib.Path to os.getcwd() via the path accessor (GH-18834) b05440c
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: