Type hints for `pathlib.types`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
- gh-131639
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the pathlib.types module and linked PR gh-131639 to determine the current state of the work. Check how annotations can remain compatible with Python 3.9, and consider the public and private classes named in the issue. Done means the module has complete, compatible type hints without changing its intended interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100