Merge with changes in main line
diff --git a/apiclient/http.py b/apiclient/http.py
index 6de443e..6bf1de4 100644
--- a/apiclient/http.py
+++ b/apiclient/http.py
@@ -151,7 +151,7 @@
media_body=media).execute()
"""
- def __init__(self, filename, mimetype=None, chunksize=10000, resumable=False):
+ def __init__(self, filename, mimetype=None, chunksize=150000, resumable=False):
"""Constructor.
Args:
diff --git a/oauth2client/appengine.py b/oauth2client/appengine.py
index f1599bb..723de8a 100644
--- a/oauth2client/appengine.py
+++ b/oauth2client/appengine.py
@@ -308,7 +308,7 @@
def __init__(self, client_id, client_secret, scope,
auth_uri='https://accounts.google.com/o/oauth2/auth',
token_uri='https://accounts.google.com/o/oauth2/token',
- message=None):
+ message=None, **kwargs):
"""Constructor for OAuth2Decorator
@@ -324,9 +324,11 @@
message: Message to display if there are problems with the OAuth 2.0
configuration. The message may contain HTML and will be presented on the
web interface for any method that uses the decorator.
+ **kwargs: dict, Keyword arguments are be passed along as kwargs to the
+ OAuth2WebServerFlow constructor.
"""
self.flow = OAuth2WebServerFlow(client_id, client_secret, scope, None,
- auth_uri, token_uri)
+ auth_uri, token_uri, **kwargs)
self.credentials = None
self._request_handler = None
self._message = message
diff --git a/samples/gtaskqueue_sample/gtaskqueue/gtaskqueue b/samples/gtaskqueue_sample/gtaskqueue/gtaskqueue
old mode 100755
new mode 100644
diff --git a/tests/test_oauth2client_appengine.py b/tests/test_oauth2client_appengine.py
index ca9d940..4ab4f03 100644
--- a/tests/test_oauth2client_appengine.py
+++ b/tests/test_oauth2client_appengine.py
@@ -236,5 +236,16 @@
self.assertEqual('foo_access_token',
self.decorator.credentials.access_token)
+
+ def test_kwargs_are_passed_to_underlying_flow(self):
+ decorator = OAuth2Decorator(client_id='foo_client_id',
+ client_secret='foo_client_secret',
+ scope=['foo_scope', 'bar_scope'],
+ access_type='offline',
+ approval_prompt='force')
+ self.assertEqual('offline', decorator.flow.params['access_type'])
+ self.assertEqual('force', decorator.flow.params['approval_prompt'])
+
+
if __name__ == '__main__':
unittest.main()