You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for the new compression.zstd module in Python 3.14 (#3611)
* Add support for the new `compression.zstd` module in Python 3.14
* Add zstandard to default 'Accept-Encoding' header for stdlib, too
* Fix all type hint issues
---------
Co-authored-by: Quentin Pradet <[email protected]>
is a compression algorithm created by Facebook with better compression
563
563
than brotli, gzip and deflate (see `benchmarks <https://facebook.github.io/zstd/#benchmarks>`_)
564
-
and is supported by urllib3 if the `zstandard package <https://pypi.org/project/zstandard/>`_ is installed.
564
+
and is supported by urllib3 in Python 3.14+ using the `compression.zstd <https://peps.python.org/pep-0784/>`_ standard library module
565
+
and for Python 3.13 and earlier if the `zstandard package <https://pypi.org/project/zstandard/>`_ is installed.
565
566
You may also request the package be installed via the ``urllib3[zstd]`` extra:
566
567
567
568
.. code-block:: bash
568
569
570
+
# This is only necessary on Python 3.13 and earlier.
571
+
# Otherwise zstandard support is included in the Python standard library.
0 commit comments