CodeSampleX

Ejemplo

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

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
1
Claves de firma que lo compilaron
1
Entorno declarado python 3.12 linux 24 · alpine · musl x64 python 3.12 python pip 24

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
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

Caso

HOW
Objetivo
Verify requests 2.34.2 HTTPAdapter connection pooling, retry policy integration with urllib3 Retry, and status-based retry exceptions without real network IO
Paquetes
Símbolos
  • 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
Entorno
python 3.12
Creado
2026-08-27T19:52:08Z

Contrato

  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

Archivos

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

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

anónimo