Optional dependencies
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- python
- 領域
- build-system, tooling
研究方向
先閱讀 METADATA.toml 的處理邏輯和 stub_uploader 的驗證,然後檢查從 requires 安裝套件的測試。定義 optional-requires 中繼資料的行為,並確認測試所需的相關套件已安裝,同時檢查所參照的 stub_uploader PR 和 #15706,了解既有的決定。
由索引模型根據 Issue 內容生成。
描述
See #15548 for an example of this problem.
Currently, we don't support optional dependencies in typeshed. Say a third-party package has some additional functionality if another third-party package is installed. For example, Authlib has a module authlib.integrations.requests_client that works only if requests is also installed. This leads to the awkward situation that our stubs for that module have many comments of the form "Inherits from requests.Session".
I suggest that we should add support for optional dependencies. Here's an idea:
- Add a field
optional-requirestoMETADATA.toml. stub_uploader checks that this has the same limitations asrequires. - In tests
optional-requiresis treated the same way thatrequiresis, i.e. the packages mentioned there are installed. stub_uploader adds this new field toproject.optional-dependenciesinpyproject.toml.
(Sidenote: Maybe we should rename requires to dependencies to match pyproject.toml.)
Linked PR:
- typeshed-internal/stub_uploader#203
- typeshed-internal/stub_uploader#208
- #15706
- 主要語言
- Python
- 星號
- 5.1k
- 分支
- 2.1k
- 平均合併
- 2 天 1 小時
- 30 天內合併 PR
- 115
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python/typeshed 的其他 Issue
-
`networkx.set_edge_attributes` should support scalar value + name可能已有人在做 @Fire162 於 10 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
false alarm on decode call可能已有人在做 @jw9829 於 38 天前認領。 未關閉help wanted stubs: false positive
難度 2/5 1-3 小時 新手友好度 76/100
python/typeshed#16441 · 1 則留言 ·
維護者通常 1 天內回覆
-
Don't run pyright basic checks on projects with strict pyright settings in CI可能已有人在做 @Mohith1612 於 74 天前認領。 未關閉project: infrastructure
難度 2/5 1-3 小時 新手友好度 68/100
python/typeshed#16005 · 1 則留言 ·
維護者通常 1 天內回覆
-
stubs: improvement
難度 2/5 1-3 小時 新手友好度 72/100
python/typeshed#15548 · 5 則留言 ·
維護者通常 1 天內回覆
-
stubs: improvement
難度 2/5 1-3 小時 新手友好度 64/100
python/typeshed#15529 · 5 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishable可能已有人在做 @RaphaelFakhri 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
mozilla/code-review#3794 ·
維護者通常 1 天內回覆
-
[oblt-aw][autodoc] Update docs that still describe the security registry as empty可能已有人在做 @github-actions 今天認領。 未關閉
難度 1/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
[Bug] adb backup script reports "Done" & exits 0 when the backup fails可能已有人在做 @bhattmanthan 今天認領。 未關閉request-issue-assignment
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
agent-ui bug p2
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
correction metadata
難度 1/5 1 小時以內 新手友好度 72/100
acl-org/acl-anthology#10768 · 1 則留言 ·
維護者通常 1 天內回覆