Open arnav13081994 opened 1 year ago
My two cents: I'm not fond of adding an additional layer of abstraction to the Stripe Python client. These are already features that exist in that client, and adding this layer of abstraction absolutely will introduce confusion, as well as increasing maintenance costs.
Additionally, adding test flags is a code smell. If you need flags to test the code, then the code should be refactored to be more appropriately testable.
If having default retries/rate limit handling is desired, a more appropriate approach would be to configure a central stripe-python
client instance and force all dj-stripe
API call methods to use that client instance.
PR #1909 and PR #1910 need to be merged before this PR can be merged.
This PR adds support for
DjStripeHTTPClient
that provides out of the box the following capabilities:rate_limit
errorslock_timeout
errorsIdempotency
keys as the case may be.