{"action":"created","issue":{"url":"https://api.github.com/repos/cloudera/impyla/issues/188","repository_url":"https://api.github.com/repos/cloudera/impyla","labels_url":"https://api.github.com/repos/cloudera/impyla/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/cloudera/impyla/issues/188/comments","events_url":"https://api.github.com/repos/cloudera/impyla/issues/188/events","html_url":"https://github.com/cloudera/impyla/issues/188","id":146847607,"number":188,"title":"cursor does not inherit 'user' from connection","user":{"login":"zepu-zhang","id":16970293,"avatar_url":"https://avatars.githubusercontent.com/u/16970293?v=3","gravatar_id":"","url":"https://api.github.com/users/zepu-zhang","html_url":"https://github.com/zepu-zhang","followers_url":"https://api.github.com/users/zepu-zhang/followers","following_url":"https://api.github.com/users/zepu-zhang/following{/other_user}","gists_url":"https://api.github.com/users/zepu-zhang/gists{/gist_id}","starred_url":"https://api.github.com/users/zepu-zhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zepu-zhang/subscriptions","organizations_url":"https://api.github.com/users/zepu-zhang/orgs","repos_url":"https://api.github.com/users/zepu-zhang/repos","events_url":"https://api.github.com/users/zepu-zhang/events{/privacy}","received_events_url":"https://api.github.com/users/zepu-zhang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-04-08T07:55:23Z","updated_at":"2016-09-11T16:50:46Z","closed_at":null,"body":"If I do\r\n\r\n```\r\nconn = connect(user='abc', ...)\r\ncursor = conn.cursor()\r\n```\r\n\r\n'cursor' does take argument 'user'. However, if not given, it does not inherit 'user' from its parent 'conn'; instead it obtains username by calling 'getpass.getuser'.\r\n\r\nThis caused trouble to me with 'ibis', which has a hidden call to 'cursor' that I simply can't reach and pass 'user' to. My hack is to set env variable 'LOGNAME' which will be picked up by 'getpass.getuser'.\r\n\r\nTo me inheriting 'user' by 'cursor' from its parent 'conn' is a natural behavior. A look into the code seems to suggest that this is not totally trivial."},"comment":{"url":"https://api.github.com/repos/cloudera/impyla/issues/comments/246190347","html_url":"https://github.com/cloudera/impyla/issues/188#issuecomment-246190347","issue_url":"https://api.github.com/repos/cloudera/impyla/issues/188","id":246190347,"user":{"login":"wesm","id":329591,"avatar_url":"https://avatars.githubusercontent.com/u/329591?v=3","gravatar_id":"","url":"https://api.github.com/users/wesm","html_url":"https://github.com/wesm","followers_url":"https://api.github.com/users/wesm/followers","following_url":"https://api.github.com/users/wesm/following{/other_user}","gists_url":"https://api.github.com/users/wesm/gists{/gist_id}","starred_url":"https://api.github.com/users/wesm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesm/subscriptions","organizations_url":"https://api.github.com/users/wesm/orgs","repos_url":"https://api.github.com/users/wesm/repos","events_url":"https://api.github.com/users/wesm/events{/privacy}","received_events_url":"https://api.github.com/users/wesm/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T16:50:46Z","updated_at":"2016-09-11T16:50:46Z","body":"cursor should definitely be inheriting `user` from whatever was specified in connect. I'm surprised that it is not already, and that this issue hasn't come up before. @laserson ?"}}
{"actor":{"display_login":"wesm"}}