⚡ Solution Summary

  • Update the verify argument to use ssl.create_default_context() instead of a string.
  • Check for other deprecated arguments in your code.
  • Ensure compatibility with httpx version 0.28.
### Describe the bug First of all, this is not really a bug. The [latest version of httpx (0.28)](https://github.com/encode/httpx/releases/tag/0.28.0) has introduced a deprecation like so: > Deprecations: > > We are working towards a simplified SSL configuration API. > > For users of the standard verify=True or verify=False cases, or verify=<ssl_context> case this should require no changes. The following cases have been deprecated... > > The verify argument as a string argument is now deprecated and will raise warnings. > The cert argument is now deprecated and will raise warnings. > > Our revised SSL documentation covers how to implement the same behaviour with a more constrained API. Now [this code](https://github.com/stripe/stripe-python/blob/82928b03d041e500598c09e78984b8e002b078ed/stripe/_http_client.py#L1246-L1251) generates a deprecation warning (assuming you have `verify_ssl_certs` enabled, which is `True` by default). ``` DeprecationWarning: `verify=<str>` is deprecated. Use `verify=ssl.create_default_context(cafile=...)` or `verify=ssl.create_default_context(capath=...)` instead. ``` ### To Reproduce 1. Fetch any resource via the HTTPX client 🤷 ### Expected behavior No warning 😄 ### Code snippets _No response_ ### OS any ### Language version 3.11 ### Library version stripe==11.3.0 ### API version N/A ### Additional context _No response_

Discussion & Fixes

helenye-stripe 2024-12-04
Hi! Thanks for bringing this up. We'll investigate a fix to suppress this warning.

Get updates

We publish verified fixes weekly. No spam.

Subscribe