Does not work on Google App Engine
Erfa opened this issue · comments
It should theoretically be possible to get hyper to run on Google App Engine, since it's a pure python module. The error you get when trying is:
File "/base/data/home/apps/***/***/lib/hyper/http20/connection.py", line 35, in <module>
TRANSIENT_SSL_ERRORS = (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE)
AttributeError: 'NoneType' object has no attribute 'SSL_ERROR_WANT_READ'
From what I can tell, this is caused by an ImportError
in the compat
module on line 14, which in turn is caused by ImportError: No module named OpenSSL
.
Sure, we can fix this by installing pyOpenSSL, but then we get a new error: ImportError: No module named cryptography.hazmat.bindings._openssl
.
And there I'm stuck, because this module contains C bindings and can therefore not be installed on App Engine.
So as far as I can tell, this problem is caused by a combination of App Engine using Python 2.7.5 and hyper's compatibility solution for Python < 2.7.9 requiring a module with C bindings.
Yup, and that problem isn't going away. 2.7.5 doesn't expose anything like enough TLS configuration for us to actually negotiate HTTP/2, so there ends up being little-to-no value in using hyper on that platform. =(
That's a bummer. But I hope it's only a matter of time until Google update their Python 2.7 environment to a more recent version, or (even better) starts supporting Python 3.
Indeed, but until that time I don't think we can really consider this an open issue on hyper.
Thanks for the report though!