Skip to content

Commit

Permalink
Merge pull request #5688 from dan-blanchard/patch-1
Browse files Browse the repository at this point in the history
Upgrade to chardet 4.x
  • Loading branch information
nateprewitt authored Dec 14, 2020
2 parents d3e0f73 + 516f84f commit b223291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions requests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run_tests(self):
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'
Expand Down

0 comments on commit b223291

Please sign in to comment.