示例
freezegun 1.5.5: Configure freezegun ignore lists, prevent queue deadlock from wiped default ignore lists, handle call-stack inspection limits, and configure real_asyncio
已验证示例 — pypi freezegun 1.5.5: Configure freezegun ignore lists, prevent queue deadlock from wiped default ignore lists, handle call-stack inspection limits…
sha256:ced890e0926f2aeefa165f3bfa8024ec62021062b020f0443b992753f24ab74e
本网络只提供一件事:能构建的样本。它在沙箱中运行并保留签名回执。它不评级、不担保——同样的代码能否在你的环境构建,它没有测量过。
提交了通过的契约回执的不同签名密钥数量。为 1 表示只有作者;大于 1 表示还有其他人构建过。密钥是自行生成的,背后没有注册身份,因此计的是密钥而非人。
MIT-0
执行证据
声明的环境与签名的运行分开呈现,你可以看到这个样本究竟运行了什么、在哪里运行。
- 证据依据
- 签名契约通过
- 验证回执
- 2
- 构建过它的签名密钥
- 2
声明的环境
python linux x64 python python pip
验证运行环境
| 环境 | 契约 | 阶段 | 运行日期 |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-16 |
| python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-18 |
案例
HOW- 目标
- Configure freezegun ignore lists, prevent queue deadlock from wiped default ignore lists, handle call-stack inspection limits, and configure real_asyncio
- 符号
-
- freezegun.configure
- freezegun.config.DEFAULT_IGNORE_LIST
- freezegun.config.reset_config
- freezegun.config.ConfigurationError
- freezegun.freeze_time
- freezegun.api.call_stack_inspection_limit
- 环境
- python
- 创建时间
- 2026-08-16T07:26:26Z
契约
- assert DEFAULT_IGNORE_LIST includes threading and queue so standard concurrency primitives keep real monotonic time
- assert configure(default_ignore_list=...) purges threading and queue, causing queue.Queue.get(timeout) to loop indefinitely under frozen monotonic time
- assert configure(extend_ignore_list=...) preserves default ignore modules while adding new prefixes, allowing queue timeouts to function properly
- assert configure() raises ConfigurationError if both default_ignore_list and extend_ignore_list are passed together
- assert reset_config() restores settings.default_ignore_list back to DEFAULT_IGNORE_LIST
- assert freeze_time(ignore=[...]) extends the active default ignore list without mutating global settings
- assert an ignored module with 'from datetime import datetime' keeps real datetime, while 'import datetime; datetime.datetime.now()' is frozen
- assert an ignored module's calls to time.time() and time.monotonic() return real time via runtime stack inspection
- assert call_stack_inspection_limit (default 5) causes time.time() called through unignored helper wrappers beyond depth 3 to silently revert to frozen time
- assert setting call_stack_inspection_limit to 0 completely disables runtime caller inspection, forcing all modules to read frozen time
- assert real_asyncio=True enables real monotonic time for asyncio event loop timers while real_asyncio=False freezes loop timers
文件
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/pipeline.py
- src/worker.py
- test/contract.py