Skip to content

Commit

Permalink
Remove Python 2 mention on chardet behavior
Browse files Browse the repository at this point in the history
`requests` no longer supports Python 2. A recent commit,
8bce583
removed the `chardet` dependency for Python 2:

```diff
-'chardet>=3.0.2,<5; python_version < "3"',
```

We should edit the docs to remove mention of behavior on Py2.
  • Loading branch information
DavidCain committed Jul 27, 2022
1 parent 7862556 commit ff8f445
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/user/advanced.rst
Expand Up @@ -717,10 +717,9 @@ If ``chardet`` is installed, ``requests`` uses it, however for python3
library is an LGPL-licenced dependency and some users of requests
cannot depend on mandatory LGPL-licensed dependencies.

When you install ``request`` without specifying ``[use_chardet_on_py3]]`` extra,
When you install ``requests`` without specifying ``[use_chardet_on_py3]`` extra,
and ``chardet`` is not already installed, ``requests`` uses ``charset-normalizer``
(MIT-licensed) to guess the encoding. For Python 2, ``requests`` uses only
``chardet`` and is a mandatory dependency there.
(MIT-licensed) to guess the encoding.

The only time Requests will not guess the encoding is if no explicit charset
is present in the HTTP headers **and** the ``Content-Type``
Expand Down

0 comments on commit ff8f445

Please sign in to comment.