The Fix
pip install stripe==14.4.0a2
Based on closed stripe/stripe-python issue #1035 · 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%.
@@ -32,7 +32,7 @@
install_requires=[
'typing_extensions <= 4.2.0, > 3.7.2; python_version < "3.7"',
- 'typing_extensions > 3.7.2; python_version >= "3.7"',
+ 'typing_extensions >= 4.0.0; python_version >= "3.7"',
'requests >= 2.20; python_version >= "3.0"',
python3 -m venv venv
source venv/bin/activate
pip install typing-extensions==3.10.0.2 # any version that satisfies the requirement, but is below 4.0.0
pip install stripe
python -m stripe # or any other way to import stripe
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install stripe==14.4.0a2\nWhen NOT to use: This fix is not applicable if the project requires compatibility with Python versions below 3.7.\n\n
Why This Fix Works in Production
- Trigger: from stripe.api_resources import * # pyright: ignore # noqa
- Mechanism: Updated the requirement for typing_extensions to be >= 4.0.0 to resolve ImportError related to 'Self'.
- Why the fix works: Updated the requirement for typing_extensions to be >= 4.0.0 to resolve ImportError related to 'Self'. (first fixed release: 14.4.0a2).
- 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.10 in real deployments (not just unit tests).
- Surfaces as: Traceback (most recent call last):
Proof / Evidence
- GitHub issue: #1035
- Fix PR: https://github.com/stripe/stripe-python/pull/1042
- First fixed release: 14.4.0a2
- Reproduced locally: No (not executed)
- Last verified: 2026-02-08
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.37
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Hi @gkreitz, thanks for bringing this issue to our attention. I've updated the requirement in https://github.com/stripe/stripe-python/pull/1042 and released in v6.3.0.”
Failure Signature (Search String)
- from stripe.api_resources import * # pyright: ignore # noqa
Error Message
Stack trace
Error Message
-------------
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/gkreitz/foo/venv/lib/python3.10/site-packages/stripe/__init__.py", line 37, in <module>
from stripe.api_resources import * # pyright: ignore # noqa
File "/home/gkreitz/foo/venv/lib/python3.10/site-packages/stripe/api_resources/__init__.py", line 7, in <module>
from . import abstract
File "/home/gkreitz/foo/venv/lib/python3.10/site-packages/stripe/api_resources/abstract/__init__.py", line 19, in <module>
from stripe.api_resources.abstract.listable_api_resource import (
File "/home/gkreitz/foo/venv/lib/python3.10/site-packages/stripe/api_resources/abstract/listable_api_resource.py", line 4, in <module>
from stripe.api_resources.list_object import ListObject
File "/home/gkreitz/foo/venv/lib/python3.10/site-packages/stripe/api_resources/list_object.py", line 2, in <module>
from typing_extensions import Self
ImportError: cannot import name 'Self' from 'typing_extensions' (/home/gkreitz/foo/venv/lib/python3.10/site-packages/typing_extensions.py)
Minimal Reproduction
python3 -m venv venv
source venv/bin/activate
pip install typing-extensions==3.10.0.2 # any version that satisfies the requirement, but is below 4.0.0
pip install stripe
python -m stripe # or any other way to import stripe
Environment
- Python: 3.10
What Broke
Importing stripe fails with ImportError when using an older version of typing-extensions.
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install stripe==14.4.0a2
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/1042
First fixed release: 14.4.0a2
Last verified: 2026-02-08. Validate in your environment.
When NOT to Use This Fix
- This fix is not applicable if the project requires compatibility with Python versions below 3.7.
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.
Version Compatibility Table
| Version | Status |
|---|---|
| 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.