Sync with importlib_metadata for Python 3.16
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Read the upstream importlib_metadata 9.0.1 and 9.1.0 changelogs linked in the issue, then compare their changes with Lib/importlib/metadata and its tests. Check each listed behavior and cleanup against the current Python 3.16 implementation; done when the applicable upstream changes are reflected and the relevant tests pass. The issue names _typing.py but does not identify specific test files.
由索引模型根據 Issue 內容生成。
描述
Tracking issue for applying importlib_metadata changes to importlib.metadata in 3.16, continuing the pattern of #132947 (3.15) and #117089 (3.13).
This covers importlib_metadata 9.0.1 and 9.1.0:
- Prefer the greater metadata directory when a path supplies more than one. Children are now considered in reverse lexicographic order, so stale metadata left behind by an interrupted or unclean upgrade no longer shadows the version in use (#100666).
- Identify the distribution when a required metadata field is missing.
Distribution.nameand.versionnow raise aKeyErrornaming both the field and the distribution, andPathDistributionrenders itself as its metadata path. - Defer
EntryPoint.valuevalidation until use. Construction no longer validates, so one malformed entry point no longer prevents entry points in other groups from being selected (python/importlib_metadata#523). importlib.metadata.diagnoseno longer crashes on a metadata directory with no metadata file, or whose metadata declares no name; such distributions are reported by their location (python/importlib_metadata#548).SimplePath.joinpathandSimplePath.__truediv__takeotherpositional-only, sopathlib.Pathsatisfies the protocol under type checkers that compare parameter names (python/importlib_metadata#542).
Two further items that are cleanups rather than behavior changes:
Prepared.normalizereturns to there.subimplementation. The hand-rolled version from #143658 was reverted upstream, so keeping it here would be fresh drift.Lib/importlib/metadata/_typing.pyis removed along with its import. Its only export,md_none, lost its last call site whenDistribution.metadatabegan raisingMetadataNotFound(#143387), but the import line survived the merge that landed that change, leaving an unused module imported by nothing.
Linked PRs
- gh-160387
- 主要語言
- Python
- 星號
- 77.7k
- 分支
- 38.3k
- 平均合併
- 13 小時 43 分鐘
- 30 天內合併 PR
- 704
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python/cpython 的其他 Issue
-
topic-socket type-bug
難度 2/5 1-3 小時 新手友好度 72/100
python/cpython#160561 · 7 則留言 ·
維護者通常 1 天內回覆
-
tests topic-profiling type-bug
難度 2/5 1-3 小時 新手友好度 78/100
python/cpython#160334 · 1 則留言 ·
維護者通常 1 天內回覆
-
`iso2022_jp_3` encodes U+9B1D but decodes the result as U+9B1C可能已有人在做 @kinqsradio 於 1 天前認領。 未關閉extension-modules type-bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
interpreter-core type-feature
難度 1/5 1 小時以內 新手友好度 78/100
python/cpython#160109 · 1 則留言 ·
維護者通常 1 天內回覆
-
extension-modules type-bug
難度 2/5 1-3 小時 新手友好度 72/100
python/cpython#160001 · 3 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
bug P1
難度 2/5 1-3 小時 新手友好度 76/100
Toloka/tolokaforge#1947 ·
維護者通常 1 天內回覆
-
SageMaker provider: streaming fails with NoStreamDataError on DJL Serving (LMI) endpoints可能已有人在做 @balajiaru 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
UKGovernmentBEIS/inspect_ai#6127 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
letsencrypt/cp-cps#361 ·
-
難度 2/5 1-3 小時 新手友好度 65/100