summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Prewitt <nate.prewitt@gmail.com>2020-12-14 09:29:10 -0800
committerGitHub <noreply@github.com>2020-12-14 09:29:10 -0800
commitb223291693402bdc2a20e58906eb026325b67f2d (patch)
treef84a5c71b4d12b8b122e46d0b53e8a32766d1d3c
parentd3e0f73354051f824cae563aeae215006158da28 (diff)
parent516f84f490ccd352672847c6a3d23c67a13b3f98 (diff)
downloadpython-requests-b223291693402bdc2a20e58906eb026325b67f2d.tar.gz
Merge pull request #5688 from dan-blanchard/patch-1
Upgrade to chardet 4.x
-rw-r--r--requests/__init__.py6
-rwxr-xr-xsetup.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/requests/__init__.py b/requests/__init__.py
index c00f556b..f8f94295 100644
--- a/requests/__init__.py
+++ b/requests/__init__.py
@@ -65,10 +65,8 @@ def check_compatibility(urllib3_version, chardet_version):
# Check chardet for compatibility.
major, minor, patch = chardet_version.split('.')[:3]
major, minor, patch = int(major), int(minor), int(patch)
- # chardet >= 3.0.2, < 3.1.0
- assert major == 3
- assert minor < 1
- assert patch >= 2
+ # chardet >= 3.0.2, < 5.0.0
+ assert (3, 0, 2) <= (major, minor, patch) < (5, 0, 0)
def _check_cryptography(cryptography_version):
diff --git a/setup.py b/setup.py
index e714bfa4..7ba4b2a2 100755
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ if sys.argv[-1] == 'publish':
packages = ['requests']
requires = [
- 'chardet>=3.0.2,<4',
+ 'chardet>=3.0.2,<5',
'idna>=2.5,<3',
'urllib3>=1.21.1,<1.27',
'certifi>=2017.4.17'