Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Upgrade to httpx 0.21.2
Change in searx.network.client:
close_connections_for_url
: httpcore closes the connections now.AsyncProxyTransportFixed
to map the exception from httpx_socks to httpx exception WITH the "request" object.AsyncHTTPTransportFixed
: the retry mecanism has moved to searx.network.network to decrease the number of access to the private API of httpx / httpcore.httpx.RemoteProtocolError
happens when a server closes an HTTP/2 connection. In the master branch,AsyncHTTPTransportFixed
closes all connections. In this PR, thehttpx.AsyncClient
is closed. It makes no difference except when different proxies are specified, for example:With this configuration, and with an
httpx.RemoteProtocolError
exception coming from the proxy on the port 1337:@unixfox @tiekoetter @paulgio I don't know you use this configuration?
An alternative configuration not impacted by this PR:
This is WIP, todo list:this a workaround to fix some of the httpcore issues
Why is this change important?
How to test this PR locally?
A lot of changes have been made to httpx, httpcore and anyio since the last upgrade, a full check is require over a long time.
what can be done locally:
Author's checklist
Related issues
Related to #589