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

Version 0.28. #3370

Merged
merged 9 commits into from
Oct 28, 2024
Merged

Version 0.28. #3370

merged 9 commits into from
Oct 28, 2024

Conversation

tomchristie
Copy link
Member

Aiming to get our current 1.0 work merged into mainline.

This PR would be a more gentle upgrade, since verify and cert 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 of certifi. If we do want to make that switch, now might be a good time to do so?

Copy link
Contributor

@T-256 T-256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, few nits...

docs/advanced/ssl.md Outdated Show resolved Hide resolved
docs/advanced/ssl.md Outdated Show resolved Hide resolved
docs/advanced/ssl.md Outdated Show resolved Hide resolved
httpx/_api.py Outdated
Comment on lines 87 to 94
* **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).
Copy link
Contributor

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?

Copy link
Member Author

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.

Comment on lines 142 to 146
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()
Copy link
Contributor

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())

Copy link
Member Author

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>
@tomchristie tomchristie changed the base branch from master to version-1.0 October 28, 2024 14:03
tomchristie and others added 2 commits October 28, 2024 14:04
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
@tomchristie tomchristie merged commit 1d93ad8 into version-1.0 Oct 28, 2024
5 checks passed
@tomchristie tomchristie deleted the version-0.28 branch October 28, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants