The Fix
You can also filter out duplicates client-side, although there is still the possibility of missing a record when you paginate (until the bug is fixed in Search).
Based on closed stripe/stripe-python issue #1689
Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.
prices: List[Price] = []
res = client.prices.search(params={"query": query_str})
print(res)
for price in res.auto_paging_iter():
print(f"Real adding {price.id}")
prices.append(price)
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Apply the official fix\nYou can also filter out duplicates client-side, although there is still the possibility of missing a record when you paginate (until the bug is fixed in Search).\nWhen NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.\n\n
Why This Fix Works in Production
- Trigger: auto_paging_iter returns duplicated items
- Mechanism: You can also filter out duplicates client-side, although there is still the possibility of missing a record when you paginate (until the bug is fixed in Search).
- If left unfixed, this can cause silent data inconsistencies that propagate (bad cache entries, incorrect downstream decisions).
Why This Breaks in Prod
- Shows up under Python 3.13 in real deployments (not just unit tests).
- Production symptom (often without a traceback): auto_paging_iter returns duplicated items
Proof / Evidence
- GitHub issue: #1689
- Reproduced locally: No (not executed)
- Last verified: 2026-02-08
- Confidence: 0.60
- Did this fix it?: No (no upstream fix linked)
- Own content ratio: 0.76
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Hi @barreeeiroo ! Quick follow-up here: The Search team has addressed the underlying issue, and I have verified that I can no longer reproduce the…”
“Hi @mbroshi-stripe, thanks for the quick update. Is there any ETA on when this issue might get resolved? I'll increase the page size in the…”
“Circling back! After additional investigation, I've learned: 1”
“👋 Hi @barreeeiroo ! Thanks for creating this issue and doing the initial triage! I've routed this issue to the team that owns the /v1/prices…”
Failure Signature (Search String)
- auto_paging_iter returns duplicated items
- 3. Log the unique IDs. At position 10 (default page size), it may sometimes be duplicated.
Copy-friendly signature
Failure Signature
-----------------
auto_paging_iter returns duplicated items
3. Log the unique IDs. At position 10 (default page size), it may sometimes be duplicated.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
auto_paging_iter returns duplicated items
3. Log the unique IDs. At position 10 (default page size), it may sometimes be duplicated.
Minimal Reproduction
prices: List[Price] = []
res = client.prices.search(params={"query": query_str})
print(res)
for price in res.auto_paging_iter():
print(f"Real adding {price.id}")
prices.append(price)
Environment
- Python: 3.13
Fix Options (Details)
Option A — Apply the official fix
You can also filter out duplicates client-side, although there is still the possibility of missing a record when you paginate (until the bug is fixed in Search).
Fix reference: https://github.com/stripe/stripe-python/issues/1689
When NOT to Use This Fix
- Do not use if it changes public behavior or if the failure cannot be reproduced.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.