Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests 2.0 support #15

Open
coagulant opened this issue Oct 5, 2013 · 2 comments
Open

Requests 2.0 support #15

coagulant opened this issue Oct 5, 2013 · 2 comments

Comments

@coagulant
Copy link

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'
@lsemel
Copy link

lsemel commented Jan 22, 2014

Getting the same thing, it's trying to parse domains as ips

@dummerbd
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants