Make pathlib ABCs usable by zipfile.Path
Open
Nobody has claimed this yet.
stdlib
topic-pathlib
type-feature
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
This issue covers the final tasks needed to make the pathlib ABCs worthy of using in zipfile.Path (i.e. zipp.Path).
Tasks
- Rename
PurePathBasetoJoinablePath, and splitPathBaseintoReadablePathandWritablePath - Make
WritablePatha sibling (not subclass) ofReadablePath - Add
ReadablePath.info - Subclass
abc.ABCfromJoinablePath, and makeparserabstract - Make type-checking more consistent
- Move metadata reading into
ReadablePath.info; removeReadablePath._copy_reader - Move metadata writing into
WritablePath._write_info(); removeWritablePath._copy_writer - Merge
pathlib._abcintopathlib.types - Tests: replace the
Dummy*classes with simplezipfile.Path-like implementation - Tests: add tests for
WritablePath - Tests: parametrize
copy()tests - Finalise
copy()implementation - Add type annotations?
- Sync code to pathlib-abc PyPI package
- Update pathlib-abc documentation
- Publish new version of pathlib-abc
- Merge PR to jaraco/zipp
Discussion: https://discuss.python.org/t/make-pathlib-extensible/3428
Linked PRs
- gh-128523
- gh-128745
- gh-129014
- gh-129841
- gh-130199
- gh-130747
- gh-130748
- gh-130964
- gh-131315
- gh-127343
- gh-131617
- gh-131621
- gh-133051
- gh-133105
- gh-133437
- gh-134101
- gh-134104
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 remaining unchecked tasks in the issue, especially type annotations and the pathlib-abc integration with jaraco/zipp PR #132. Read the linked pathlib ABC and zipfile.Path work before deciding whether anything remains to implement; done means the outstanding task is completed and the related tests and package synchronization remain consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100