-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
contrib/_appengine_environ.py KeyError SERVER_SOFTWARE #1470
Comments
I would accept a PR that makes this change. cc: @theacodes |
Yeah, fine with me. I'd be curious to know when the local server doesn't set the |
The Travis CI build could not complete ... |
Any innovations here? @pquentin @theacodes |
I just ran into this bug, (simplified reproduction of how I ran into it https://repl.it/repls/ThinSpatialNumerator) and was about to submit a fix much like the two that have already been proposed. There is some new, and possibly relevant information. This function def is_prod_appengine_mvms():
return os.environ.get('GAE_VM', False) == 'true' seems to always returns False now. App Engine stopped setting this variable and removed it from their PHP docs (I couldn't find any references to it in the python docs). It looks like the reasons the original CL never made it in seem to be because they didn't work quite right on flex, but since the flex check isn't working anymore anyway, and no one seems to be complaining about it, I suggest we move forward with the fix now. |
https://github.com/urllib3/urllib3/blob/master/src/urllib3/contrib/_appengine_environ.py
In the development environment, the variable SERVER_SOFTWARE is sometimes not set, so the query should read as follows:
os.environ.get('SERVER_SOFTWARE', '').startswith('Development')
The text was updated successfully, but these errors were encountered: