Update requires-dist and documentation for Brotli
MODIFY
docs/advanced-usage.rst
docs/advanced-usage.rst
@@ -273,3 +273,19 @@ To use the Sockets API, add the following to your app.yaml and use
For more details on the limitations and gotchas, see
:mod:`urllib3.contrib.appengine`.
+
+Brotli Encoding
+---------------
+
+Brotli is a compression algorithm created by Google with better compression
+than gzip and deflate and is supported by urllib3 if the
+`brotlipy <https://github.com/python-hyper/brotlipy>`_ package is installed.
+You may also request the package be installed via the ``urllib3[brotli]`` extra::
+
+ python -m pip install urllib3[brotli]
+
+Here's an example using brotli encoding via the ``Accept-Encoding`` header::
+
+ >>> from urllib3 import PoolManager
+ >>> http = PoolManager()
+ >>> http.request('GET', 'https://www.google.com/', headers={'Accept-Encoding': 'br'})

MODIFY
setup.cfg
setup.cfg
@@ -10,6 +10,7 @@ license_file = LICENSE.txt
provides-extra =
secure
socks
+ brotli
requires-dist =
pyOpenSSL>=0.14; extra == 'secure'
cryptography>=1.3.4; extra == 'secure'
@@ -17,6 +18,7 @@ requires-dist =
certifi; extra == 'secure'
ipaddress; python_version=="2.7" and extra == 'secure'
PySocks>=1.5.6,<2.0,!=1.5.7; extra == 'socks'
+ brotlipy>=0.6.0; extra == 'brotli'
[pytest]
xfail_strict = true

Update requires-dist and documentation for Brotli (#1534)