Apparently commit 3315d5a broke the imports on Google App Engine.
streaming.py imports ssl which is fine everywhere except on Google App Engine where ssl tries to import _ssl. That import does not exist on Google App Engine and thus it fails.
A workaround for now may be to enable the SSL library: https://developers.google.com/appengine/docs/python/sockets/ssl_support
I don't think we need this import and we can probably factor it out in the next release.
I'm not even sure why we try to catch the SSLError specifically in this case.
@Aaron1011 Thoughts? Can we just revert this change for now? I don't recall what value it added.
Turning on SSL in the Google App Engine environment fixed the broken import.
So I'm thinking the streaming API won't work without sockets turned on anyway, so maybe import ssl should be wrapped in a try/except block that tells App Engine devs to turn on SSL and leave it at that?
I'm OK with this issue being closed, with or without the above-mentioned change. Thanks for your help.
@joshthecoder @singhj: I think we should keep it. It's good to be handling SSL errors, even if they occur infrequently. Having a stream end unexpectedly due to an unhandled error could break people's code.
Okay closing for now since the enabling SSL seems to fix it.