Skip to content

Commit d3ff3f4

Browse files
authored
docs: align retry and pipeline docs (#72)
PR: #72
1 parent 026615f commit d3ff3f4

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ with UrllibHttpClient() as client, client.execute(request) as response:
8686
### A configured pipeline
8787

8888
`default_pipeline()` returns a `StagedPipelineBuilder` pre-wired with the
89-
canonical policy stack (redirect, idempotency, retry, set-date,
90-
client-identity, logging, tracing). Add authentication and adjust whatever
89+
canonical policy stack (operation-tracing, redirect, idempotency, retry,
90+
set-date, client-identity, logging, tracing). Add authentication and adjust whatever
9191
the defaults get wrong for you:
9292

9393
```python

docs/bodies.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ classmethod factories for the common shapes.
1818

1919
Single-use bodies raise `RuntimeError` on the second `iter_bytes` call.
2020
The retry policy in `pipeline.policies.retry` **does** automatically
21-
buffer single-use bodies when retries are enabled: `RetryPolicy.send`
22-
calls `body.to_replayable()` before the first attempt whenever
23-
`total_retries > 0`, so a retry can re-emit the same payload. The
24-
buffering step is skipped when `total_retries == 0`; if you bypass the
25-
retry policy you can still call `body.to_replayable()` yourself before
26-
the first send.
21+
buffer single-use bodies when the effective per-call retry total is
22+
positive: `RetryPolicy.send` merges any `retry_total` override in
23+
`ctx.options` with the policy's `total_retries` default, then calls
24+
`body.to_replayable()` before the first attempt whenever that merged
25+
total is greater than zero. A per-call `retry_total=3` over a
26+
`total_retries=0` policy still buffers for replay, while a per-call
27+
`retry_total=0` over a retrying policy skips the buffering step. If you
28+
bypass the retry policy you can still call `body.to_replayable()`
29+
yourself before the first send.
2730

2831
## Response shape
2932

0 commit comments

Comments
 (0)