Closed
Description
Proposal
Add a PathBase
class that can be subclassed by users to implement "virtual paths", e.g. paths within .zip
files or on FTP servers, and publish it as an external PyPI package.
Phase 1: Private support in pathlib
- Add private
_PathBase
class - Merge
WalkTests
intoDummyPathTest
- Sort out
__hash__()
,__eq__
, etc - we shouldn't inherit thePurePath
implementation - Simplify/speed up path walking and globbing
- Add
from_uri()
classmethod
Phase 2: Experimental support in PyPI package
- Move ABCs into
pathlib._abc
- Figure out the default value for
pathmod
, if any - Publish PyPI package
Previous Discussion
https://discuss.python.org/t/make-pathlib-extensible/3428
Linked PRs
- GH-110109: Simplify pathlib test setup #110308
- GH-110109: pathlib docs: bring
from_uri()
andas_uri()
together. #110312 - [WIP] GH-110109: Make pathlib extensible #110321
- GH-110109: Speed up
pathlib._PathBase.resolve()
#110412 - GH-110109: Move tests for
pathlib.Path.walk()
into main test classes. #110655 - GH-110109: Add
pathlib._PurePathBase
#110670 - GH-110109: Churn
pathlib.PurePath
methods #112012 - GH-110109: Fix misplaced tests for
pathlib.WindowsPath.owner()
andgroup()
#112239 - GH-110109: Test pure functionality of
pathlib.Path
user subclasses #112242 - GH-110109: Move pathlib ABCs to new
pathlib._abc
module. #112881 - gh-110109: Fix installed buildbots now
pathlib
is a package #112901 - GH-110109: Move tests for pathlib ABCs to new module. #112904
- GH-110109: pathlib ABCs: do not vary path syntax by host OS. #113219
- GH-110109: pathlib tests: store base directory as test class attribute #113221
- GH-110109: Drop use of new regex features in
pathlib._abc
. #113292 - GH-110109: Fix misleading
pathlib._abc.PurePathBase
repr #113376 - GH-110109: Adjust
test_pathlib_abc
imports to ease backporting #113411 - GH-110109: pathlib ABCs: drop use of
io.text_encoding()
#113417 - GH-110109: pathlib ABCs: drop use of
warnings._deprecated()
#113419
Activity