You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(paginators): expose max_pages on every public *_all() method
Plumb max_pages: int | None = None through all 19 public *_all()
paginator methods (sync + async, 38 signatures) so callers can cap
fetch depth from outside without subclassing the resource. Previously
the cap existed only on the internal _list_all and silently defaulted
to 1000 pages.
- _list_all: accept max_pages=None (default 1000), positive int caps
page fetches at that count.
- _validate_max_pages: rejects max_pages <= 0 with ValueError at the
public boundary; None and positive ints pass through.
- Add "client_only" ExclusionKind for kwargs that have no wire
counterpart (max_pages is purely a client-side knob). EXCLUSIONS
registers max_pages for every *_all FQN so TestRequestParamDrift
doesn't flag the new kwarg as REMOVE drift.
- Tests cover the bare numeric cap (cap=1 / cap=3 with a fresh-cursor
side effect so cursor-loop detection can't trip), empty-cursor
termination (F-Q-17 regression), and ValueError on max_pages=0 at
the public list_all boundary (markets).
Closes#98
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments