CodeSampleX

Ejemplo

tenacity 9.1.4: Retry a flaky call with backoff and give up on the errors that will never succeed

Muestra verificada para pypi tenacity 9.1.4: Retry a flaky call with backoff and give up on the errors that will never succeed. El contrato se ejecutó en…

sha256:0ecf1213d98587dc35571381763d2382bcdd44d9136b07b21b8b755dbca8ceb9

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
2
Claves de firma que lo compilaron
2
Entorno declarado python 3.12 linux x64 python 3.12 python pip

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
python 3.12 · linux alpine/x64 · docker ed25519:a2ec939a4c60e243 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-13
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

Caso

HOW
Objetivo
Retry a flaky call with backoff and give up on the errors that will never succeed
Paquetes
Símbolos
  • retry
  • stop_after_attempt
  • wait_fixed
  • retry_if_exception_type
Entorno
python 3.12
Creado
2026-08-13T18:43:56Z

Contrato

  1. retry a function that fails twice then succeeds
  2. assert it was called exactly three times
  3. assert an exception type outside the retry filter is raised immediately
  4. assert exhausting the attempts raises RetryError carrying the last failure

Archivos

  • csx.json
  • requirements.txt
  • src/__init__.py
  • src/retry.py
  • test/contract.py

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

Seeder de origen

anonymous