Make pathlib ABCs usable by zipfile.Path
未关闭
还没有人认领这个 Issue。
stdlib
topic-pathlib
type-feature
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- PR 合并指标
- PR 指标待抓取
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 issue 中剩余的未勾选任务,尤其是类型注解以及与 jaraco/zipp PR #132 的 pathlib-abc 集成。在决定是否还有内容需要实现之前,先阅读链接的 pathlib ABC 和 zipfile.Path 工作;完成意味着未完成的任务已经完成,并且相关测试和包同步仍保持一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- operating-systems
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100