Jump to solution
Verify

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.

Jump to Verify
repro.py
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)
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
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).
Production impact:
  • 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…”
@mbroshi-stripe · 2026-01-06 · confirmation · source
“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…”
@barreeeiroo · 2025-12-16 · confirmation · source
“Circling back! After additional investigation, I've learned: 1”
@mbroshi-stripe · 2025-12-16 · confirmation · source
“👋 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…”
@mbroshi-stripe · 2025-12-16 · source

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
signature.txt
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.txt
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

repro.py
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).

When NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.

Fix reference: https://github.com/stripe/stripe-python/issues/1689

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • Do not use if it changes public behavior or if the failure cannot be reproduced.

Verify Fix

verify
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.