Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
bf56ce0e
Commit
bf56ce0e
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
cf8dcb43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
_appengine_environ.py
...ackages/pip/_vendor/urllib3/contrib/_appengine_environ.py
+36
-0
No files found.
stbi/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py
0 → 100644
View file @
bf56ce0e
"""
This module provides means to detect the App Engine environment.
"""
import
os
def
is_appengine
():
return
is_local_appengine
()
or
is_prod_appengine
()
def
is_appengine_sandbox
():
"""Reports if the app is running in the first generation sandbox.
The second generation runtimes are technically still in a sandbox, but it
is much less restrictive, so generally you shouldn't need to check for it.
see https://cloud.google.com/appengine/docs/standard/runtimes
"""
return
is_appengine
()
and
os
.
environ
[
"APPENGINE_RUNTIME"
]
==
"python27"
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
os
.
environ
.
get
(
"SERVER_SOFTWARE"
,
""
)
.
startswith
(
"Google App Engine/"
)
def
is_prod_appengine_mvms
():
"""Deprecated."""
return
False
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment