Repository navigation
Feature: add httpx2 support with httpx fallback - #328
Conversation
Deprecate the use of httpx in favor of httpx2.
There was a problem hiding this comment.
Aware that this file is a bit funky. Honestly, this test can be removed IMO. But up to you.
There was a problem hiding this comment.
I think this test could be removed. Instead, running all other tests without httpx2 in the env (using httpx) seems more meaningful.
There was a problem hiding this comment.
Do you want to test like pydantic is done? I ended up having it only test 1 time in the matrix because it seems excessive to me to run it for everything. But that can be done too.
| "anyio >=3.6.1, <5.0.0", | ||
| "httpx >=0.23.0, <1.0.0", | ||
| "hishel[async,httpx] >=1.3.0, <=2.0.0", | ||
| "hishel[async,httpx] >=1.4.0, <=2.0.0", |
There was a problem hiding this comment.
Bump here because this is the first version that supports httpx2. I want to avoid a really strange case where you somehow have httpx2 but not the version of hishel that supports it and you get a super strange import error / explosion. This also makes the _httpx.py file a bit more reliable in its try-except.
|
I am working on some important $DAYJOB things today. But after work, I will do the pyproject change you wanted and look into the failing CI. Please give me any other changes you want me to tackle (if you have any) and I will do them tonight! |
Have a test run with httpx instead of httpx2
|
I am going to be away till next week. Next week, I will come back to this. Feel free to make any commits to my PR as you see fit or wait for me to get back. |
Preserve the HTTP compatibility layer for upstream auth timeout changes and verify timeout propagation with both backends.
Override way of disabling httpx2
|
A bit delayed but should be updated with your requests! |
yanyongyu
left a comment
There was a problem hiding this comment.
small typo. githubkit uses lower case name in the docs.
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
|
brilliant! thank you! |
Deprecate the use of httpx in favor of httpx2 when supplied.
Closes #321
Replaces #324
If the environment of the caller has httpx2 installed, we use that. Otherwise, we give them a deprecation warning.
In the future, httpx should be dropped and a hard cut to the
httpx2namespace should be used. This is to help avoid client mismatch.