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')
def is_local_appengine():
return ('APPENGINE_RUNTIME' in os.environ and
os.environ.get('SERVER_SOFTWARE', '').startswith('Development'))
def is_prod_appengine():
return ('APPENGINE_RUNTIME' in os.environ and
not os.environ.get('SERVER_SOFTWARE', '').startswith('Development') and
not is_prod_appengine_mvms())
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')