CodeSampleX

サンプル

requests 2.34.2: Preserve Session state and environment CA verification settings when manually preparing and sending Requests 2.34.2 calls

検証済みサンプル — pypi requests 2.34.2: Preserve Session state and environment CA verification settings when manually preparing and sending Requests 2.34.2 calls.…

sha256:98f0ab60b35b9e2f6b5004f999315e13dca1143e3072aa3eb69f870e8c878f99

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 python 3.12 linux x64 python 3.12 python 3.12 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-17
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
ゴール
Preserve Session state and environment CA verification settings when manually preparing and sending Requests 2.34.2 calls
パッケージ
シンボル
  • requests.Request.prepare
  • requests.Session.prepare_request
  • requests.Session.merge_environment_settings
  • requests.Session.send
  • requests.Session.get
環境
python 3.12
作成日
2026-08-17T03:54:11Z

コントラクト

  1. assert Request.prepare omits Session default headers and cookies while Session.prepare_request applies both
  2. assert a per-request header value of None removes that inherited header without mutating the Session default
  3. assert Session.send of a prepared request uses Session.verify and does not consult REQUESTS_CA_BUNDLE by itself
  4. assert Session.get and an explicit merge_environment_settings plus Session.send both pass REQUESTS_CA_BUNDLE to the recording adapter as verify
  5. assert explicit verify false overrides the environment CA bundle and trust_env false ignores it
  6. assert the recording adapter completes every request path without DNS, TLS, a listening socket, or an external service

ファイル

  • NOTES.md
  • csx.json
  • requirements.in
  • requirements.lock
  • requirements.txt
  • test/contract.py

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed