getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

gevent/ssl.py broken on Python > 2.7.9 #652

Open ewdurbin opened 9 years ago

ewdurbin commented 9 years ago
Traceback (most recent call last):
  File "/gw/events-app/.env/lib/python2.7/site-packages/raven/transport/threaded.py", line 162, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/gw/events-app/.env/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/gw/events-app/.env/lib/python2.7/site-packages/raven/utils/http.py", line 62, in urlopen
    return opener.open(url, data, timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/gw/events-app/.env/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1194, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in request
    self._send_request(method, url, body, headers)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1093, in _send_request
    self.endheaders(body)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders
    self._send_output(message_body)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 893, in _send_output
    self.send(msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 855, in send
    self.connect()
  File "/gw/events-app/.env/lib/python2.7/site-packages/raven/utils/http.py", line 38, in connect
    sock, ca_certs=ca_certs, cert_reqs=ssl.CERT_REQUIRED)
  File "/gw/events-app/.env/lib/python2.7/site-packages/gevent/ssl.py", line 383, in wrap_socket
    ciphers=ciphers)
  File "/gw/events-app/.env/lib/python2.7/site-packages/gevent/ssl.py", line 85, in __init__
    self._sslobj = _ssl.sslwrap(self._sock, server_side,
AttributeError: 'module' object has no attribute 'sslwrap'
Sentry responded with an error: 'module' object has no attribute 'sslwrap' (url: https://sentry.dev.thegroundwork.com/api/10/store/)
ewdurbin commented 9 years ago
$ .env/bin/pip freeze | grep raven
raven==5.6.0
$ .env/bin/pip freeze | egrep 'greenlet|gevent'
gevent==1.0.1
greenlet==0.4.9
$ .env/bin/python --version
Python 2.7.10

quick check with 2.7.9 showed same. 2.7.8 was fine.

ewdurbin commented 9 years ago

https://github.com/gevent/gevent/issues/477

ewdurbin commented 9 years ago

https://github.com/eventlet/eventlet/issues/135