Requests version conflicts?
Chrosea opened this issue · 6 comments
In the newer version of Requests(for me it's 2.30.0), it looks like Retry
method no longer has the argument method_whitelist
. I've got an error like
retry = Retry(total=self.retries, read=self.retries,
TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist'
According to https://stackoverflow.com/questions/65289720/attributeerror-retry-object-has-no-attribute-method-whitelist
The thing is that method_whitelist was deprecated and removed from urllib3==1.26.0 onwards
Also in pytrends/request.py
, the import of retry is not valid to IDE in the newer version of urllib3.
Looks like from requests.packages.urllib3.util.retry import Retry
should be from urllib3.util import Retry
now
Sorry @im-n1 but there's a bug in vcrpy that prevents the test suite to work with urllib3 v2, you can follow the problem in the PR: #584 (comment)
I wonder if there are any updates? Or is there a way for temporary workaround?
Hi @im-n1,
Sorry, but Real Life™ keeps me busy right now, I'll try this weekend to check if kevin1024/vcrpy#719 made any difference, or what can we do about this.
For now the workaroud is to pin urllib3<2
in your requirements.
For now the workaroud is to pin urllib3<2 in your requirements.
works thanks