Skip to content
Myr

Packaging dependancy tweaks (#1206)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Remove idna and add brotli to extras * Update dependency docs * Update BrotliDecoder error message * Add nocover

authored by Joe · committed by GitHub · parent 19515e8 · Browse files · 4 files+18 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Tom Christie <tom@tomchristie.com>

Diff stats

4 files+18 added−8 removed

  • other:+18 added−8 removed

4 files+18 added−8 removed

modified:docs/index.md+8 added-2 removed
modified:httpx/_decoders.py+7 added-3 removed
106 unmodified lines
107 name. The top branches are for 'brotlipy' and bottom branches for 'Brotli'108 """109110 def __init__(self, request: "Request") -> None:111 assert (112 brotli is not None113 ), "The 'brotlipy' or 'brotli' library must be installed to use 'BrotliDecoder'"111 if brotli is None: # pragma: nocover112 raise ImportError(113 "Using 'BrotliDecoder', but the 'brotlipy' or 'brotli' library "114 "is not installed."115 "Make sure to install httpx using `pip install httpx[brotli]`."116 ) from None117118 self.request = request119 self.decompressor = brotli.Decompressor()120 self.seen_data = False121 if hasattr(self.decompressor, "decompress"):
192 unmodified lines
modified:README.md+1 added-1 removed
117 unmodified lines
118 * `h11` - HTTP/1.1 support.119 * `h2` - HTTP/2 support. *(Optional)*120* `certifi` - SSL certificates.121* `chardet` - Fallback auto-detection for response encoding.122* `idna` - Internationalized domain name support.122* `rfc3986` - URL parsing & normalization.123 * `idna` - Internationalized domain name support.124* `sniffio` - Async library autodetection.125* `urllib3` - Support for the `httpx.URLLib3Transport` class. *(Optional)*126* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*127
6 unmodified lines
modified:setup.py+2 added-2 removed
56 unmodified lines
57 install_requires=[58 "certifi",59 "sniffio",60 "chardet==3.*",61 "idna==2.*",62 "rfc3986>=1.3,<2",61 "rfc3986[idna2008]>=1.3,<2",62 "httpcore==0.10.*",63 ],64 extras_require={65 "http2": "h2==3.*",66 "brotli": "brotlipy==0.7.*",67 },68 classifiers=[69 "Development Status :: 4 - Beta",70 "Environment :: Web Environment",
13 unmodified lines