Jump to solution
Verify

The Fix

pip install stripe==14.4.0a2

Based on closed stripe/stripe-python issue #922 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -53,14 +53,14 @@ def log_debug(message, **params): if _console_log_level() == "debug": print(msg, file=sys.stderr) - logger.debug(msg) + logger.debug(msg, params)
repro.py
$ python Python 3.9.11 (main, Sep 22 2022, 13:08:52) [Clang 14.0.0 (clang-1400.0.29.102)] on darwin Type "help", "copyright", "credits" or "license" for more information. >> import stripe >> stripe.version.VERSION '5.1.0' >> $ cat test_blah.py import stripe def test_stripe_api(): stripe.api_key = "sk_test_xyz" stripe.api_base = "http://localhost:12111" # points to a locally running stripe-mock stripe.Customer.search(query='metadata["toolchain_id"]:"george" AND metadata["toolchain_env"]:"jerry"') $ python -m pytest test_blah.py ========================================= test session starts ========================================== platform darwin -- Python 3.9.11, pytest-7.2.1, pluggy-1.0.0 rootdir: /Users/richardm/testbed/python collected 1 item test_blah.py . [100%] ========================================== 1 passed in 0.08s ===========================================
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install stripe==14.4.0a2\nWhen NOT to use: This fix should not be applied if the logging behavior is intentionally modified for other purposes.\n\n

Why This Fix Works in Production

  • Trigger: Recent logging change breaks under tests
  • Mechanism: Passes parameters into the logger's info and debug methods, which resolves the logging issue encountered in version 5.1.0.
  • Why the fix works: Passes parameters into the logger's info and debug methods, which resolves the logging issue encountered in version 5.1.0. (first fixed release: 14.4.0a2).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.9 in real deployments (not just unit tests).
  • Production symptom (often without a traceback): Recent logging change breaks under tests

Proof / Evidence

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“I've released 5.1.1 with the revert, and also yanked 5.1.0 from PyPi”
@richardm-stripe · 2023-02-06 · confirmation · source
“Ah, I triggered it with I will spend some time investigating, and I will push either a fix or a revert shortly.”
@richardm-stripe · 2023-02-06 · source
“Hello @asherf, thank you for the report. We will likely need to revert that change. So far, I have been unable to reproduce: Would love…”
@richardm-stripe · 2023-02-06 · source
“> Ah, I triggered it with > > > > I will spend some time investigating, and I will push either a fix or a…”
@asherf · 2023-02-06 · source

Failure Signature (Search String)

  • Recent logging change breaks under tests
  • We see this exception when using version 5.1.0 of the stripe sdk,
Copy-friendly signature
signature.txt
Failure Signature ----------------- Recent logging change breaks under tests We see this exception when using version 5.1.0 of the stripe sdk,

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Recent logging change breaks under tests We see this exception when using version 5.1.0 of the stripe sdk,

Minimal Reproduction

repro.py
$ python Python 3.9.11 (main, Sep 22 2022, 13:08:52) [Clang 14.0.0 (clang-1400.0.29.102)] on darwin Type "help", "copyright", "credits" or "license" for more information. >> import stripe >> stripe.version.VERSION '5.1.0' >> $ cat test_blah.py import stripe def test_stripe_api(): stripe.api_key = "sk_test_xyz" stripe.api_base = "http://localhost:12111" # points to a locally running stripe-mock stripe.Customer.search(query='metadata["toolchain_id"]:"george" AND metadata["toolchain_env"]:"jerry"') $ python -m pytest test_blah.py ========================================= test session starts ========================================== platform darwin -- Python 3.9.11, pytest-7.2.1, pluggy-1.0.0 rootdir: /Users/richardm/testbed/python collected 1 item test_blah.py . [100%] ========================================== 1 passed in 0.08s ===========================================

Environment

  • Python: 3.9

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install stripe==14.4.0a2

When NOT to use: This fix should not be applied if the logging behavior is intentionally modified for other purposes.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/stripe/stripe-python/pull/913

First fixed release: 14.4.0a2

Last verified: 2026-02-08. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix should not be applied if the logging behavior is intentionally modified for other purposes.

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.

Version Compatibility Table

VersionStatus
14.4.0a2 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.