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