Merge dfdf7f309a into b5addb64f0
This commit is contained in:
commit
c78bf3e22b
@ -98,7 +98,7 @@ $ pip install httpx
|
||||
Or, to include the optional HTTP/2 support, use:
|
||||
|
||||
```shell
|
||||
$ pip install httpx[http2]
|
||||
$ pip install 'httpx[http2]'
|
||||
```
|
||||
|
||||
HTTPX requires Python 3.9+.
|
||||
|
||||
@ -73,7 +73,7 @@ This is an optional feature that requires an additional third-party library be i
|
||||
You can install SOCKS support using `pip`:
|
||||
|
||||
```shell
|
||||
$ pip install httpx[socks]
|
||||
$ pip install 'httpx[socks]'
|
||||
```
|
||||
|
||||
You can now configure a client to make requests via a proxy using the SOCKS protocol:
|
||||
|
||||
@ -28,7 +28,7 @@ trying out our HTTP/2 support. You can do so by first making sure to install
|
||||
the optional HTTP/2 dependencies...
|
||||
|
||||
```shell
|
||||
$ pip install httpx[http2]
|
||||
$ pip install 'httpx[http2]'
|
||||
```
|
||||
|
||||
And then instantiating a client with HTTP/2 support enabled:
|
||||
|
||||
@ -136,13 +136,13 @@ $ pip install httpx
|
||||
Or, to include the optional HTTP/2 support, use:
|
||||
|
||||
```shell
|
||||
$ pip install httpx[http2]
|
||||
$ pip install 'httpx[http2]'
|
||||
```
|
||||
|
||||
To include the optional brotli and zstandard decoders support, use:
|
||||
|
||||
```shell
|
||||
$ pip install httpx[brotli,zstd]
|
||||
$ pip install 'httpx[brotli,zstd]'
|
||||
```
|
||||
|
||||
HTTPX requires Python 3.9+
|
||||
|
||||
@ -679,7 +679,7 @@ class Client(BaseClient):
|
||||
except ImportError: # pragma: no cover
|
||||
raise ImportError(
|
||||
"Using http2=True, but the 'h2' package is not installed. "
|
||||
"Make sure to install httpx using `pip install httpx[http2]`."
|
||||
"Make sure to install httpx using `pip install 'httpx[http2]'`."
|
||||
) from None
|
||||
|
||||
allow_env_proxies = trust_env and transport is None
|
||||
@ -1393,7 +1393,7 @@ class AsyncClient(BaseClient):
|
||||
except ImportError: # pragma: no cover
|
||||
raise ImportError(
|
||||
"Using http2=True, but the 'h2' package is not installed. "
|
||||
"Make sure to install httpx using `pip install httpx[http2]`."
|
||||
"Make sure to install httpx using `pip install 'httpx[http2]'`."
|
||||
) from None
|
||||
|
||||
allow_env_proxies = trust_env and transport is None
|
||||
|
||||
@ -120,7 +120,7 @@ class BrotliDecoder(ContentDecoder):
|
||||
raise ImportError(
|
||||
"Using 'BrotliDecoder', but neither of the 'brotlicffi' or 'brotli' "
|
||||
"packages have been installed. "
|
||||
"Make sure to install httpx using `pip install httpx[brotli]`."
|
||||
"Make sure to install httpx using `pip install 'httpx[brotli]'`."
|
||||
) from None
|
||||
|
||||
self.decompressor = brotli.Decompressor()
|
||||
@ -163,7 +163,7 @@ class ZStandardDecoder(ContentDecoder):
|
||||
Handle 'zstd' RFC 8878 decoding.
|
||||
|
||||
Requires `pip install zstandard`.
|
||||
Can be installed as a dependency of httpx using `pip install httpx[zstd]`.
|
||||
Can be installed as a dependency of httpx using `pip install 'httpx[zstd]'`.
|
||||
"""
|
||||
|
||||
# inspired by the ZstdDecoder implementation in urllib3
|
||||
@ -171,7 +171,7 @@ class ZStandardDecoder(ContentDecoder):
|
||||
if zstandard is None: # pragma: no cover
|
||||
raise ImportError(
|
||||
"Using 'ZStandardDecoder', ..."
|
||||
"Make sure to install httpx using `pip install httpx[zstd]`."
|
||||
"Make sure to install httpx using `pip install 'httpx[zstd]'`."
|
||||
) from None
|
||||
|
||||
self.decompressor = zstandard.ZstdDecompressor().decompressobj()
|
||||
|
||||
@ -190,7 +190,7 @@ class HTTPTransport(BaseTransport):
|
||||
except ImportError: # pragma: no cover
|
||||
raise ImportError(
|
||||
"Using SOCKS proxy, but the 'socksio' package is not installed. "
|
||||
"Make sure to install httpx using `pip install httpx[socks]`."
|
||||
"Make sure to install httpx using `pip install 'httpx[socks]'`."
|
||||
) from None
|
||||
|
||||
self._pool = httpcore.SOCKSProxy(
|
||||
@ -334,7 +334,7 @@ class AsyncHTTPTransport(AsyncBaseTransport):
|
||||
except ImportError: # pragma: no cover
|
||||
raise ImportError(
|
||||
"Using SOCKS proxy, but the 'socksio' package is not installed. "
|
||||
"Make sure to install httpx using `pip install httpx[socks]`."
|
||||
"Make sure to install httpx using `pip install 'httpx[socks]'`."
|
||||
) from None
|
||||
|
||||
self._pool = httpcore.AsyncSOCKSProxy(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user