@@ -60,10 +60,10 @@ def app_wrapped_in_user_middleware(app):
6060def get_add_middleware_from_appengine_config ():
6161 """Tries to import appengine_config and return middleware; fails silently.
6262
63- `appengine_config ` is optionally part of GAE-compatible user code.
63+ `env_config ` is optionally part of GAE-compatible user code.
6464 If the user chooses to define the `webapp_add_wsgi_middleware` function
6565 there, then we will use it to wrap app scripts. This is used for e.g.
66- appstats. Many user apps do not have or need appengine_config , so failure
66+ appstats. Many user apps do not have or need env_config , so failure
6767 to import it or failure to find `webapp_add_wsgi_middleware` is not an
6868 error.
6969
@@ -81,7 +81,7 @@ def get_add_middleware_from_appengine_config():
8181
8282
8383def load_user_scripts_into_handlers (handlers ):
84- """Preloads user scripts, wrapped in appengine_config middleware if present.
84+ """Preloads user scripts, wrapped in env_config middleware if present.
8585
8686 Args:
8787 handlers: appinfo_external.handlers data as provided by get_module_config()
@@ -103,45 +103,45 @@ def load_user_scripts_into_handlers(handlers):
103103 return loaded_handlers
104104
105105
106- def env_vars_from_appengine_config ( appengine_config ):
106+ def env_vars_from_env_config ( env_config ):
107107 """Generate a dict suitable for updating os.environ to reflect app config.
108108
109109 This function only returns a dict and does not update os.environ directly.
110110
111111 Args:
112- appengine_config : The app configuration as generated by
113- vmconfig.BuildVmAppengineEnvConfig()
112+ env_config : The app configuration as generated by
113+ vmconfig.BuildVmAppengineEnvConfig()
114114
115115 Returns:
116116 A dict of strings suitable for e.g. `os.environ.update(values)`.
117117 """
118118
119- return {'SERVER_SOFTWARE' : appengine_config .server_software ,
119+ return {'SERVER_SOFTWARE' : env_config .server_software ,
120120 'APPENGINE_RUNTIME' : 'python27' ,
121- 'APPLICATION_ID' : '%s~%s' % (appengine_config .partition ,
122- appengine_config .appid ),
123- 'INSTANCE_ID' : appengine_config .instance ,
124- 'BACKEND_ID' : appengine_config .major_version ,
125- 'CURRENT_MODULE_ID' : appengine_config .module ,
126- 'CURRENT_VERSION_ID' : '%s.%s' % (appengine_config .major_version ,
127- appengine_config .minor_version ),
128- 'DEFAULT_TICKET' : appengine_config .default_ticket }
121+ 'APPLICATION_ID' : '%s~%s' % (env_config .partition ,
122+ env_config .appid ),
123+ 'INSTANCE_ID' : env_config .instance ,
124+ 'BACKEND_ID' : env_config .major_version ,
125+ 'CURRENT_MODULE_ID' : env_config .module ,
126+ 'CURRENT_VERSION_ID' : '%s.%s' % (env_config .major_version ,
127+ env_config .minor_version ),
128+ 'DEFAULT_TICKET' : env_config .default_ticket }
129129
130130
131- def user_env_vars_from_appinfo_external ( appinfo_external ):
131+ def user_env_vars_from_appinfo ( appinfo ):
132132 """Generate a dict of env variables specified by the user in app.yaml.
133133
134134 This function only returns a dict and does not update os.environ directly.
135135
136136 Args:
137- appinfo_external : The app.yaml configuration info as generated by
138- get_module_config()
137+ appinfo : The configuration info (a parsed yaml object) as generated by
138+ get_module_config()
139139
140140 Returns:
141141 A dict of strings suitable for e.g. `os.environ.update(values)`.
142142 """
143143
144- return appinfo_external .env_variables or {}
144+ return appinfo .env_variables or {}
145145
146146
147147# Dictionary with thread-local contents.
0 commit comments