{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/573","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/573/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/573/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/573/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/573","id":55581466,"number":573,"title":"DISCUSSION PR: Add __environ__ to gcloud package to augment user agent","user":{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-01-27T06:31:47Z","updated_at":"2015-01-30T17:38:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/573","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/573","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/573.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/573.patch"},"body":"See #566.\r\n\r\nThis should not be merged (uses lots of `pragma: NO COVER`), it is just a quick and dirty way to go about it.\r\n\r\nThe App Engine import is innocuous, but the Compute Engine metadata server HTTP should not happen every single time `gcloud` is imported (or any sub-package / sub-module). This is the thing I want to discuss."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments/72239268","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/573#issuecomment-72239268","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/573","id":72239268,"user":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T17:38:37Z","updated_at":"2015-01-30T17:38:37Z","body":"> I figured #573 (comment) would be more free form.\r\n\r\nIt seemed useful to me to preserve the \"library\" info along with the application-specific tag.\r\n\r\n> Assigning `Connection.user_agent = gcloud_environment.user_agent` at definition time will cause `reify` to make the HTTP request and we're back in the same situation of an HTTP during import.\r\n\r\nI hadn't meant to force it at import time;  rather, I would use `@reify` to wrap `Connection.user_agent()`."}}