![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | CheckSupportedVersion |
def | CheckForUpdates |
def | AllowedToCheckForUpdates |
Static Public Member Functions | |
def | MakeNagFilename |
Public Attributes | |
rpcserver | |
isdir | |
isfile | |
open | |
runtimes | |
runtime_to_api_version | |
Determines if the local SDK is the latest version. Nags the user when there are updates to the SDK. As the SDK becomes more out of date, the language in the nagging gets stronger. We store a little yaml file in the user's home directory so that we nag the user only once a week. The yaml file has the following field: 'timestamp': Last time we nagged the user in seconds since the epoch. Attributes: rpcserver: An AbstractRpcServer instance used to check for the latest SDK. config: The app's AppInfoExternal. Needed to determine which api_version the app is using.
def google.appengine.tools.sdk_update_checker.SDKUpdateChecker.__init__ | ( | self, | |
rpcserver, | |||
configs, | |||
isdir = os.path.isdir , |
|||
isfile = os.path.isfile , |
|||
open_fn = open |
|||
) |
Create a new SDKUpdateChecker. Args: rpcserver: The AbstractRpcServer to use. configs: A list of yaml objects or a single yaml object that specify the configuration of this application. isdir: Replacement for os.path.isdir (for testing). isfile: Replacement for os.path.isfile (for testing). open_fn: Replacement for the open builtin (for testing).
def google.appengine.tools.sdk_update_checker.SDKUpdateChecker.AllowedToCheckForUpdates | ( | self, | |
input_fn = raw_input |
|||
) |
Determines if the user wants to check for updates. On startup, the dev_appserver wants to check for updates to the SDK. Because this action reports usage to Google when the user is not otherwise communicating with Google (e.g. pushing a new app version), the user must opt in. If the user does not have a nag file, we will query the user and save the response in the nag file. Subsequent calls to this function will re-use that response. Args: input_fn: used to collect user input. This is for testing only. Returns: True if the user wants to check for updates. False otherwise.
def google.appengine.tools.sdk_update_checker.SDKUpdateChecker.CheckForUpdates | ( | self | ) |
Queries the server for updates and nags the user if appropriate. Queries the server for the latest SDK version at the same time reporting the local SDK version. The server will respond with a yaml document containing the fields: 'release': The name of the release (e.g. 1.2). 'timestamp': The time the release was created (YYYY-MM-DD HH:MM AM/PM TZ). 'api_versions': A list of api_version strings (e.g. ['1', 'beta']). We will nag the user with increasing severity if: - There is a new release. - There is a new release with a new api_version. - There is a new release that does not support an api_version named in a configuration in self.configs.
def google.appengine.tools.sdk_update_checker.SDKUpdateChecker.CheckSupportedVersion | ( | self | ) |
Determines if the app's api_version is supported by the SDK. Uses the api_version field from the AppInfoExternal to determine if the SDK supports that api_version. Raises: sys.exit if the api_version is not supported.
|
static |
Returns the filename for the nag file for this user.