CodeSampleX

サンプル

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

検証済みサンプル — pypi tenacity 9.1.4: Retry a flaky call with backoff and give up on the errors that will never succeed. python 3.12 · linux alpine/x64 · docker で…

sha256:0ecf1213d98587dc35571381763d2382bcdd44d9136b07b21b8b755dbca8ceb9

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

実行証拠

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

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 python 3.12 linux x64 python 3.12 python pip

検証実行環境

環境 コントラクト ステージ 実行日
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

ケース

HOW
ゴール
Retry a flaky call with backoff and give up on the errors that will never succeed
パッケージ
シンボル
  • retry
  • stop_after_attempt
  • wait_fixed
  • retry_if_exception_type
環境
python 3.12
作成日
2026-08-13T18:43:56Z

コントラクト

  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

ファイル

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

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

オリジンシーダー

anonymous