{"action":"created","comment":{"url":"https://api.github.com/repos/requests/requests-oauthlib/pulls/comments/47437669","id":47437669,"diff_hunk":"@@ -64,19 +64,15 @@ def __init__(self, client_id=None, client=None, auto_refresh_url=None,\n         :param kwargs: Arguments to pass to the Session constructor.\n         \"\"\"\n         super(OAuth2Session, self).__init__(**kwargs)\n-        self.client_id = client_id\n-        if client is not None and not self.client_id:\n-            self.client_id = client.client_id\n+        self._client = client or WebApplicationClient(client_id, token=token)\n+        self.token = token or {}","path":"requests_oauthlib/oauth2_session.py","position":8,"original_position":8,"commit_id":"76da85aaf02762250729ab86663b56c343cfcc83","original_commit_id":"76da85aaf02762250729ab86663b56c343cfcc83","user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"body":"This logic is not quite the same: falsy objects for `client` will now be not set. I'm nervous about this as a back-incompatible change.","created_at":"2015-12-12T22:34:46Z","updated_at":"2015-12-12T22:34:46Z","html_url":"https://github.com/requests/requests-oauthlib/pull/208#discussion_r47437669","pull_request_url":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208","_links":{"self":{"href":"https://api.github.com/repos/requests/requests-oauthlib/pulls/comments/47437669"},"html":{"href":"https://github.com/requests/requests-oauthlib/pull/208#discussion_r47437669"},"pull_request":{"href":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208"}}},"pull_request":{"url":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208","id":53483473,"html_url":"https://github.com/requests/requests-oauthlib/pull/208","diff_url":"https://github.com/requests/requests-oauthlib/pull/208.diff","patch_url":"https://github.com/requests/requests-oauthlib/pull/208.patch","issue_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/208","number":208,"state":"open","locked":false,"title":"Getters/Setters for wrapped attributes","user":{"login":"singingwolfboy","id":132355,"avatar_url":"https://avatars.githubusercontent.com/u/132355?v=3","gravatar_id":"","url":"https://api.github.com/users/singingwolfboy","html_url":"https://github.com/singingwolfboy","followers_url":"https://api.github.com/users/singingwolfboy/followers","following_url":"https://api.github.com/users/singingwolfboy/following{/other_user}","gists_url":"https://api.github.com/users/singingwolfboy/gists{/gist_id}","starred_url":"https://api.github.com/users/singingwolfboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singingwolfboy/subscriptions","organizations_url":"https://api.github.com/users/singingwolfboy/orgs","repos_url":"https://api.github.com/users/singingwolfboy/repos","events_url":"https://api.github.com/users/singingwolfboy/events{/privacy}","received_events_url":"https://api.github.com/users/singingwolfboy/received_events","type":"User","site_admin":false},"body":"Code that uses requests-oauthlib may want to modify values in the oauth2 session client, but requests-oauthlib doesn't expose them in a consistent way. By exposing getters and setters, other software and libraries that wrap requests-oauthlib can modify these values in a consistent way.","created_at":"2015-12-12T19:28:42Z","updated_at":"2015-12-12T22:34:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d372a6b7e12741baf8d102531b993ea44fcdfa8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208/commits","review_comments_url":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208/comments","review_comment_url":"https://api.github.com/repos/requests/requests-oauthlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/208/comments","statuses_url":"https://api.github.com/repos/requests/requests-oauthlib/statuses/76da85aaf02762250729ab86663b56c343cfcc83","head":{"label":"singingwolfboy:getters-setters","ref":"getters-setters","sha":"76da85aaf02762250729ab86663b56c343cfcc83","user":{"login":"singingwolfboy","id":132355,"avatar_url":"https://avatars.githubusercontent.com/u/132355?v=3","gravatar_id":"","url":"https://api.github.com/users/singingwolfboy","html_url":"https://github.com/singingwolfboy","followers_url":"https://api.github.com/users/singingwolfboy/followers","following_url":"https://api.github.com/users/singingwolfboy/following{/other_user}","gists_url":"https://api.github.com/users/singingwolfboy/gists{/gist_id}","starred_url":"https://api.github.com/users/singingwolfboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singingwolfboy/subscriptions","organizations_url":"https://api.github.com/users/singingwolfboy/orgs","repos_url":"https://api.github.com/users/singingwolfboy/repos","events_url":"https://api.github.com/users/singingwolfboy/events{/privacy}","received_events_url":"https://api.github.com/users/singingwolfboy/received_events","type":"User","site_admin":false},"repo":{"id":23722641,"name":"requests-oauthlib","full_name":"singingwolfboy/requests-oauthlib","owner":{"login":"singingwolfboy","id":132355,"avatar_url":"https://avatars.githubusercontent.com/u/132355?v=3","gravatar_id":"","url":"https://api.github.com/users/singingwolfboy","html_url":"https://github.com/singingwolfboy","followers_url":"https://api.github.com/users/singingwolfboy/followers","following_url":"https://api.github.com/users/singingwolfboy/following{/other_user}","gists_url":"https://api.github.com/users/singingwolfboy/gists{/gist_id}","starred_url":"https://api.github.com/users/singingwolfboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singingwolfboy/subscriptions","organizations_url":"https://api.github.com/users/singingwolfboy/orgs","repos_url":"https://api.github.com/users/singingwolfboy/repos","events_url":"https://api.github.com/users/singingwolfboy/events{/privacy}","received_events_url":"https://api.github.com/users/singingwolfboy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/singingwolfboy/requests-oauthlib","description":"OAuthlib support for Python-Requests!","fork":true,"url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib","forks_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/forks","keys_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/teams","hooks_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/hooks","issue_events_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/issues/events{/number}","events_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/events","assignees_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/assignees{/user}","branches_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/branches{/branch}","tags_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/tags","blobs_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/statuses/{sha}","languages_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/languages","stargazers_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/stargazers","contributors_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/contributors","subscribers_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/subscribers","subscription_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/subscription","commits_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/contents/{+path}","compare_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/merges","archive_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/downloads","issues_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/issues{/number}","pulls_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/pulls{/number}","milestones_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/milestones{/number}","notifications_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/labels{/name}","releases_url":"https://api.github.com/repos/singingwolfboy/requests-oauthlib/releases{/id}","created_at":"2014-09-06T00:31:26Z","updated_at":"2015-04-28T03:40:07Z","pushed_at":"2015-12-12T19:38:04Z","git_url":"git://github.com/singingwolfboy/requests-oauthlib.git","ssh_url":"git@github.com:singingwolfboy/requests-oauthlib.git","clone_url":"https://github.com/singingwolfboy/requests-oauthlib.git","svn_url":"https://github.com/singingwolfboy/requests-oauthlib","homepage":"https://requests-oauthlib.readthedocs.org/","size":242,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"requests:master","ref":"master","sha":"4128a1aa44d621b806f457ed18298a9db4862d57","user":{"login":"requests","id":2805331,"avatar_url":"https://avatars.githubusercontent.com/u/2805331?v=3","gravatar_id":"","url":"https://api.github.com/users/requests","html_url":"https://github.com/requests","followers_url":"https://api.github.com/users/requests/followers","following_url":"https://api.github.com/users/requests/following{/other_user}","gists_url":"https://api.github.com/users/requests/gists{/gist_id}","starred_url":"https://api.github.com/users/requests/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/requests/subscriptions","organizations_url":"https://api.github.com/users/requests/orgs","repos_url":"https://api.github.com/users/requests/repos","events_url":"https://api.github.com/users/requests/events{/privacy}","received_events_url":"https://api.github.com/users/requests/received_events","type":"Organization","site_admin":false},"repo":{"id":6825724,"name":"requests-oauthlib","full_name":"requests/requests-oauthlib","owner":{"login":"requests","id":2805331,"avatar_url":"https://avatars.githubusercontent.com/u/2805331?v=3","gravatar_id":"","url":"https://api.github.com/users/requests","html_url":"https://github.com/requests","followers_url":"https://api.github.com/users/requests/followers","following_url":"https://api.github.com/users/requests/following{/other_user}","gists_url":"https://api.github.com/users/requests/gists{/gist_id}","starred_url":"https://api.github.com/users/requests/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/requests/subscriptions","organizations_url":"https://api.github.com/users/requests/orgs","repos_url":"https://api.github.com/users/requests/repos","events_url":"https://api.github.com/users/requests/events{/privacy}","received_events_url":"https://api.github.com/users/requests/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/requests/requests-oauthlib","description":"OAuthlib support for Python-Requests!","fork":false,"url":"https://api.github.com/repos/requests/requests-oauthlib","forks_url":"https://api.github.com/repos/requests/requests-oauthlib/forks","keys_url":"https://api.github.com/repos/requests/requests-oauthlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/requests/requests-oauthlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/requests/requests-oauthlib/teams","hooks_url":"https://api.github.com/repos/requests/requests-oauthlib/hooks","issue_events_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/events{/number}","events_url":"https://api.github.com/repos/requests/requests-oauthlib/events","assignees_url":"https://api.github.com/repos/requests/requests-oauthlib/assignees{/user}","branches_url":"https://api.github.com/repos/requests/requests-oauthlib/branches{/branch}","tags_url":"https://api.github.com/repos/requests/requests-oauthlib/tags","blobs_url":"https://api.github.com/repos/requests/requests-oauthlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/requests/requests-oauthlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/requests/requests-oauthlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/requests/requests-oauthlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/requests/requests-oauthlib/statuses/{sha}","languages_url":"https://api.github.com/repos/requests/requests-oauthlib/languages","stargazers_url":"https://api.github.com/repos/requests/requests-oauthlib/stargazers","contributors_url":"https://api.github.com/repos/requests/requests-oauthlib/contributors","subscribers_url":"https://api.github.com/repos/requests/requests-oauthlib/subscribers","subscription_url":"https://api.github.com/repos/requests/requests-oauthlib/subscription","commits_url":"https://api.github.com/repos/requests/requests-oauthlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/requests/requests-oauthlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/requests/requests-oauthlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/requests/requests-oauthlib/contents/{+path}","compare_url":"https://api.github.com/repos/requests/requests-oauthlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/requests/requests-oauthlib/merges","archive_url":"https://api.github.com/repos/requests/requests-oauthlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/requests/requests-oauthlib/downloads","issues_url":"https://api.github.com/repos/requests/requests-oauthlib/issues{/number}","pulls_url":"https://api.github.com/repos/requests/requests-oauthlib/pulls{/number}","milestones_url":"https://api.github.com/repos/requests/requests-oauthlib/milestones{/number}","notifications_url":"https://api.github.com/repos/requests/requests-oauthlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/requests/requests-oauthlib/labels{/name}","releases_url":"https://api.github.com/repos/requests/requests-oauthlib/releases{/id}","created_at":"2012-11-23T10:19:44Z","updated_at":"2015-12-09T15:40:09Z","pushed_at":"2015-12-12T19:38:04Z","git_url":"git://github.com/requests/requests-oauthlib.git","ssh_url":"git@github.com:requests/requests-oauthlib.git","clone_url":"https://github.com/requests/requests-oauthlib.git","svn_url":"https://github.com/requests/requests-oauthlib","homepage":"https://requests-oauthlib.readthedocs.org/","size":298,"stargazers_count":503,"watchers_count":503,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":140,"mirror_url":null,"open_issues_count":30,"forks":140,"open_issues":30,"watchers":503,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208"},"html":{"href":"https://github.com/requests/requests-oauthlib/pull/208"},"issue":{"href":"https://api.github.com/repos/requests/requests-oauthlib/issues/208"},"comments":{"href":"https://api.github.com/repos/requests/requests-oauthlib/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/requests/requests-oauthlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/requests/requests-oauthlib/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/requests/requests-oauthlib/statuses/76da85aaf02762250729ab86663b56c343cfcc83"}}}}