hammock
hammock copied to clipboard
Requests 2.0 support
I haven't delved into the code, but there is a some kind of incompatibility with new requests.
Traceback (most recent call last):
File "/Users/prophet/projects/djangodash2013/gopython3/api/tests.py", line 34, in test_wrapper_parses_data_correct
data = self.api_wrapper.ask_about_package_info(name=self.package_name)
File "/Users/prophet/projects/djangodash2013/gopython3/api/abstract_wrappers.py", line 33, in make_request_with_kwargs
response = getattr(self.hammock, request_method)(**request_kwargs)
File "/Users/prophet/.envs/djangodash2013/lib/python3.3/site-packages/hammock.py", line 107, in aux
return hammock._request(method, *args, **kwargs)
File "/Users/prophet/.envs/djangodash2013/lib/python3.3/site-packages/hammock.py", line 100, in _request
return self._session.request(method, self._url(*args), **kwargs)
File "/Users/prophet/.envs/djangodash2013/lib/python3.3/site-packages/requests/sessions.py", line 330, in request
env_proxies = get_environ_proxies(url) or {}
File "/Users/prophet/.envs/djangodash2013/lib/python3.3/site-packages/requests/utils.py", line 419, in get_environ_proxies
if proxy_bypass(netloc):
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/urllib/request.py", line 2476, in proxy_bypass
return proxy_bypass_macosx_sysconf(host)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/urllib/request.py", line 2460, in proxy_bypass_macosx_sysconf
return _proxy_bypass_macosx_sysconf(host, proxy_settings)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/urllib/request.py", line 2434, in _proxy_bypass_macosx_sysconf
hostIP = ip2num(hostIP)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/urllib/request.py", line 2413, in ip2num
parts = list(map(int, parts))
ValueError: invalid literal for int() with base 10: 'pypi'
Getting the same thing, it's trying to parse domains as ips
Is this still an issue? I'm planning on using Hammock for interacting with a REST api and I am already using requests 2.4+ with Python 3 because it is a dependency for some other packages I use.