Skip to content
Myr

better checking for urllib3

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent bcd0e17 · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:requests/__init__.py+5 added-1 removed
44 unmodified lines
45from .__version__ import __copyright__, __cake__4647# Check urllib3 for compatibility.48import urllib349major, minor, patch = urllib3.__version__.split('.')[:3]49urllib3_version = urllib3.__version__.split('.')50# Sometimes, urllib3 only reports its version as 16.1.51if len(urllib3_version) == 2:52 urllib3_version.append('0')53major, minor, patch= urllib3_version54major, minor, patch = int(major), int(minor), int(patch)55# urllib3 >= 1.21.1, < 1.2256try:57 assert major == 1
55 unmodified lines