spyoungtech / grequests

Requests + Gevent = <3
https://pypi.python.org/pypi/grequests
BSD 2-Clause "Simplified" License
4.49k stars 331 forks source link

Just importing `grequests` breaks `requests.Session.post()` #69

Closed famousgarkin closed 8 years ago

famousgarkin commented 9 years ago

Just importing grequests breaks requests.Session.post() for me.

 File "venv/lib/python2.7/site-packages/requests/sessions.py", line 508, in post
  return self.request('POST', url, data=data, json=json, **kwargs)
File "venv/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
  resp = self.send(prep, **send_kwargs)
File "venv/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
  r = adapter.send(request, **kwargs)
File "venv/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
  timeout=timeout
File "venv/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
  body=body, headers=headers)
File "venv/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 341, in _make_request
  self._validate_conn(conn)
File "venv/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 761, in _validate_conn
  conn.connect()
File "venv/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 238, in connect
  ssl_version=resolved_ssl_version)
File "venv/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py", line 279, in ssl_wrap_socket
  return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 350, in wrap_socket
  _context=self)
TypeError: __init__() got an unexpected keyword argument 'server_hostname'
kennethreitz commented 8 years ago

Looks like this might be related to the versions of your packages/python. Try updating to latest on everything.