-
-
Notifications
You must be signed in to change notification settings - Fork 844
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
Version 0.28. #3370
Version 0.28. #3370
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, few nits...
httpx/_api.py
Outdated
* **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to | ||
verify the identity of requested hosts. Either `True` (default CA bundle), | ||
a path to an SSL certificate file, an `ssl.SSLContext`, or `False` | ||
(which will disable verification). | ||
* **cert** - *(optional)* An SSL certificate used by the requested host | ||
to authenticate the client. Either a path to an SSL certificate file, or | ||
two-tuple of (certificate file, key file), or a three-tuple of (certificate | ||
file, key file, password). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it's better to keep these with *(deprecated)*
tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm neither for or against that.
httpx/_transports/default.py
Outdated
if verify is not None or cert is not None: # pragma: nocover | ||
# Deprecated... | ||
ssl_context = create_ssl_context(verify, cert) | ||
else: | ||
ssl_context = ssl_context or SSLContext() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps, raising error when used together?
httpx.get("https://example.com/", verify=False, ssl_context=httpx..SSLContext())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay yep... I'm going to retitle our version-1.0
branch and will resolve there.
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
Aiming to get our current 1.0 work merged into mainline.
This PR would be a more gentle upgrade, since
verify
andcert
become deprecated but do continue to function with warnings. I'd value other maintainers perspective on this.The one other aspect to this worth considering is that it would be a really small change from here for us to switch to
truststore
instead ofcertifi
. If we do want to make that switch, now might be a good time to do so?