CodeSampleX

示例

Verify requests 2.34.2 HTTPAdapter connection pooling, retry policy integration with urllib3 Retry, and status-based retry exceptions without real network IO

sha256:47657f601a798c7a55793759a600448c04aecc8f91f8bfc2c922a9cf80e2f273

本网络只提供一件事:能构建的样本。它在沙箱中运行并保留签名回执。它不评级、不担保——同样的代码能否在你的环境构建,它没有测量过。 提交了通过的契约回执的不同签名密钥数量。为 1 表示只有作者;大于 1 表示还有其他人构建过。密钥是自行生成的,背后没有注册身份,因此计的是密钥而非人。 MIT-0

执行证据

声明的环境与签名的运行分开呈现,你可以看到这个样本究竟运行了什么、在哪里运行。

证据依据
签名契约通过
验证回执
1
构建过它的签名密钥
1
声明的环境 python 3.12 linux 24 · alpine · musl x64 python 3.12 python pip 24

验证运行环境

环境 契约 阶段 运行日期
python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962…
2026-08-27

案例

HOW
目标
Verify requests 2.34.2 HTTPAdapter connection pooling, retry policy integration with urllib3 Retry, and status-based retry exceptions without real network IO
符号
  • requests.adapters.HTTPAdapter
  • requests.adapters.HTTPAdapter.init_poolmanager
  • requests.adapters.HTTPAdapter.get_connection
  • requests.adapters.HTTPAdapter.get_connection_with_tls_context
  • requests.adapters.HTTPAdapter.build_response
  • requests.adapters.HTTPAdapter.request_url
  • requests.adapters.HTTPAdapter.close
  • requests.adapters.DEFAULT_POOLSIZE
  • requests.adapters.DEFAULT_RETRIES
  • requests.adapters.DEFAULT_POOLBLOCK
环境
python 3.12
创建时间
2026-08-27T19:52:08Z

契约

  1. assert HTTPAdapter initializes with default pool size of 10 and a zero-retry urllib3 Retry instance
  2. assert custom urllib3.util.Retry configuration and pool sizes are preserved and configured on the pool manager
  3. assert HTTPAdapter.get_connection provisions HTTPConnectionPool and HTTPSConnectionPool matching target scheme and reuses instances for the same host
  4. assert HTTPAdapter.build_response converts urllib3 HTTPResponse into requests.Response with CaseInsensitiveDict headers and attached request reference
  5. assert HTTPAdapter.request_url returns relative path_url for direct requests and full URL for HTTP proxy requests
  6. assert Session.mount gives custom HTTPAdapter prefix precedence over default adapters
  7. assert HTTPAdapter.send translates urllib3 MaxRetryError caused by ResponseError into requests.exceptions.RetryError
  8. assert RetryError inherits directly from RequestException and is not a subclass of ConnectionError

文件

  • NOTES.md
  • PROMPT.md
  • csx.json
  • pyproject.toml
  • requirements.txt
  • spec.json
  • test/contract.py

下载源代码构件 (tar.gz)

原始种子者

匿名