示例
Inspect installed entry points, package metadata, and wheel files with importlib-metadata 9.0.0 without loading plugins or using the network
sha256:df4bc17751b6ee1502a2da150f19295d9001e2f16f2f6b2470cc4ff17d1f4138
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Inspect installed entry points, package metadata, and wheel files with importlib-metadata 9.0.0 without loading plugins or using the network HOW
- 包
- importlib-metadata 9.0.0 zipp 4.1.0
- 环境
- python
- 创建时间
- 2026-08-17T02:12:58Z
常见的想当然
Callers often treat entry_points() and files() as plain lists of strings or paths and miss the selection, name lookup, distribution, hash, and location semantics carried by their specialized result objects.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- The third-party importlib_metadata package resolves its installed 9.0.0 distribution under normalized hyphen and underscore names.
- metadata() preserves repeated headers through get_all() and exposes normalized JSON fields, including the zipp runtime requirement.
- entry_points() returns EntryPoints whose select() filters by group and name; EntryPoints lookup is by entry-point name rather than numeric position.
- The installed pip console entry point exposes module and attr without loading the target plugin.
- files() returns PackagePath objects tied to their distribution; locate() reaches the imported third-party module and RECORD supplies hashes and sizes except for its own row.
文件
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9