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: Remove pathlib accessors
Type: performance Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barneygale, eric.araujo, eric.smith, eryksun, miss-islington, petr.viktorin, pitrou
Priority: normal Keywords: patch

Created on 2021-01-23 18:15 by barneygale, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25701 merged barneygale, 2021-04-28 22:23
Messages (4)
msg385556 - (view) Author: Barney Gale (barneygale) * Date: 2021-01-23 18:15
Per Pitrou:

> The original intent for the “accessor” thing was to have a variant that did all accesses under a filesystem tree in a race condition-free way using openat and friends. It turned out to be much too hairy to actually implement, so was entirely abandoned, but the accessor abstraction was left there.

https://discuss.python.org/t/make-pathlib-extensible/3428/2

Accessors are:

- Lacking any internal purpose - '_NormalAccessor' is the only implementation
- Lacking any firm conceptual difference to `Path` objects themselves (inc. subclasses)
- Non-public, i.e. underscore prefixed - '_Accessor' and '_NormalAccessor' 
- Unofficially used to implement customized `Path` objects, but once once bpo-24132 lands there will be a supported route for that.

When bpo-24132 lands, I think we're free to remove accessors and simplify some code
msg410732 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2022-01-16 23:11
PR looks good, just needs a look by a pathlib expert.
msg410733 - (view) Author: Barney Gale (barneygale) * Date: 2022-01-16 23:30
Thank you Éric!
msg412353 - (view) Author: miss-islington (miss-islington) Date: 2022-02-02 12:38
New changeset 08f8301b21648d58d053e1a513db8ed32fbf37dd by Barney Gale in branch 'main':
bpo-43012: remove `pathlib._Accessor` (GH-25701)
https://github.com/python/cpython/commit/08f8301b21648d58d053e1a513db8ed32fbf37dd
History
Date User Action Args
2022-04-11 14:59:40adminsetgithub: 87178
2022-02-02 15:37:05eric.araujosetstatus: open -> closed
nosy: + petr.viktorin

resolution: fixed
stage: patch review -> resolved
2022-02-02 12:38:49miss-islingtonsetnosy: + miss-islington
messages: + msg412353
2022-01-16 23:30:44barneygalesetmessages: + msg410733
2022-01-16 23:11:50eric.araujosetnosy: + eric.araujo, pitrou, eryksun, eric.smith
messages: + msg410732
2021-05-14 03:22:17barneygalesettype: performance
versions: + Python 3.11
2021-04-28 22:23:22barneygalesetkeywords: + patch
stage: patch review
pull_requests: + pull_request24391
2021-01-23 18:15:55barneygalecreate