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
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.
Proposal
Add a
PathBaseclass that can be subclassed by users to implement "virtual paths", e.g. paths within.zipfiles or on FTP servers, and publish it as an external PyPI package.Phase 1: Private support in pathlib
_PathBaseclasspathlib._PathBase#106337WalkTestsintoDummyPathTestpathlib.Path.walk()into main test classes. #110655__hash__(),__eq__, etc - we shouldn't inherit thePurePathimplementationpathlib.PurePathmethods #112012pathlib._PurePathBase#110670glob.translate()function #106703from_uri()classmethodpathlib.Path.from_uri()classmethod. #107640Phase 2: Experimental support in PyPI package
pathlib._abcpathlib._abcmodule. #112881pathmod, if anyPrevious Discussion
https://discuss.python.org/t/make-pathlib-extensible/3428
Linked PRs
from_uri()andas_uri()together. #110312pathlib._PathBase.resolve()#110412pathlib.Path.walk()into main test classes. #110655pathlib._PurePathBase#110670pathlib.PurePathmethods #112012pathlib.WindowsPath.owner()andgroup()#112239pathlib.Pathuser subclasses #112242pathlib._abcmodule. #112881pathlibis a package #112901pathlib._abc. #113292pathlib._abc.PurePathBaserepr #113376test_pathlib_abcimports to ease backporting #113411io.text_encoding()#113417warnings._deprecated()#113419