Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning with the latest httpx re verify kwarg #1428

Closed
slafs opened this issue Dec 3, 2024 · 1 comment · Fixed by #1431
Closed

Warning with the latest httpx re verify kwarg #1428

slafs opened this issue Dec 3, 2024 · 1 comment · Fixed by #1431
Labels

Comments

@slafs
Copy link

slafs commented Dec 3, 2024

Describe the bug

First of all, this is not really a bug.

The latest version of httpx (0.28) 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 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

@slafs slafs added the bug label Dec 3, 2024
@helenye-stripe
Copy link
Contributor

Hi! Thanks for bringing this up. We'll investigate a fix to suppress this warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants