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 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 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)

オリジンシーダー

匿名