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

docs: Add quotes to the installation command #3511

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.8+.
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.8+
Expand Down
4 changes: 2 additions & 2 deletions httpx/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def __init__(
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
Expand Down Expand Up @@ -1393,7 +1393,7 @@ def __init__(
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
Expand Down
6 changes: 3 additions & 3 deletions httpx/_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self) -> None:
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()
Expand Down Expand Up @@ -163,15 +163,15 @@ 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
def __init__(self) -> None:
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()
Expand Down
4 changes: 2 additions & 2 deletions httpx/_transports/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def __init__(
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(
Expand Down Expand Up @@ -334,7 +334,7 @@ def __init__(
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(
Expand Down