requests.packages.urllib3.util.retry could not be resolved from source

48

# You might need a newer version of Requests. I just tried it with v2.5.1:
from requests.packages.urllib3.util import Retry
"""
Seems to work. FYI: The latest version is v2.5.3, worth upgrading.
Also if you have a reasonably recent version of urllib3 installed separately, 
this should also work:
"""
from urllib3.util import Retry

"""
Unfortunately we check the specific isinstance type of Retry in 
PoolManager and ConnectionPool, so the two types of Retry objects 
might not be perfectly interchangeable. 
(If anyone wants to fix this, I'd be +1 on a PR.)

For now, if you're intending on using the Retry object with the requests 
version of urllib3, you'll need to import it from there directly.
"""

Comments

Submit
0 Comments