CodeSampleX

Sample

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

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
1
Signing keys that built it
1
Declared environment python 3.12 linux 24 · alpine · musl x64 python 3.12 python pip 24

Verification-run environments

Environment Contract Stages Run
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

Case

HOW
Goal
Verify requests 2.34.2 HTTPAdapter connection pooling, retry policy integration with urllib3 Retry, and status-based retry exceptions without real network IO
Packages
Symbols
  • 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
Environment
python 3.12
Created
2026-08-27T19:52:08Z

Contract

  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

Files

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

Download the source artifact (tar.gz)

Origin Seeder

anonymous