Skip to content

Commit b223291

Browse files
authored
Merge pull request #5688 from dan-blanchard/patch-1
Upgrade to chardet 4.x
2 parents d3e0f73 + 516f84f commit b223291

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

requests/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ def check_compatibility(urllib3_version, chardet_version):
6565
# Check chardet for compatibility.
6666
major, minor, patch = chardet_version.split('.')[:3]
6767
major, minor, patch = int(major), int(minor), int(patch)
68-
# chardet >= 3.0.2, < 3.1.0
69-
assert major == 3
70-
assert minor < 1
71-
assert patch >= 2
68+
# chardet >= 3.0.2, < 5.0.0
69+
assert (3, 0, 2) <= (major, minor, patch) < (5, 0, 0)
7270

7371

7472
def _check_cryptography(cryptography_version):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def run_tests(self):
4242
packages = ['requests']
4343

4444
requires = [
45-
'chardet>=3.0.2,<4',
45+
'chardet>=3.0.2,<5',
4646
'idna>=2.5,<3',
4747
'urllib3>=1.21.1,<1.27',
4848
'certifi>=2017.4.17'

0 commit comments

Comments
 (0)