Make pathlib extensible

:sparkles: December 2023 progress report :sparkles:

I’ve added a private PurePathBase class (GH-110670) and moved the base classes into a private pathlib._abc module (GH-112881, GH-112904). Thank you @AlexWaygood and @tjreedy for helping solve a performance regresssion (GH-112907). The class hierarchy now looks like this:

I’ve copy-pasted the ABC code into a new repository:

I intend to publish this as a PyPI package once some of the more embarassing bugs are fixed. The package will serve as a proving-ground for the ABCs, with a view towards adding them to the (public) standard library once they’ve matured. I’ll make a proper announcement once the first version of the PyPI package is published.

Happy holidays all :slight_smile:

8 Likes