Feature or enhancement
The pathlib.types module is new in 3.14, and contains a single public class: pathlib.types.PathInfo.
This module also contains a few private classes: _PathParser, _JoinablePath, _ReadablePath and _WritablePath.
As the pathlib.types module is not imported by pathlib, I think we're free to add proper type annotations to the entire module, including the private classes. I think this will help clarify the interface.
I'd like these hints to be compatible with the oldest version of Python still receiving security updates (3.9 at time of writing) because I'm hoping to provide a PyPI package from this module.
Linked PRs
Feature or enhancement
The
pathlib.typesmodule is new in 3.14, and contains a single public class:pathlib.types.PathInfo.This module also contains a few private classes:
_PathParser,_JoinablePath,_ReadablePathand_WritablePath.As the
pathlib.typesmodule is not imported bypathlib, I think we're free to add proper type annotations to the entire module, including the private classes. I think this will help clarify the interface.I'd like these hints to be compatible with the oldest version of Python still receiving security updates (3.9 at time of writing) because I'm hoping to provide a PyPI package from this module.
Linked PRs