Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(141)

Issue 6349087: Loading of client_secrets JSON file backed by a cache

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 12 months ago by alexv
Modified:
12 years, 11 months ago
Reviewers:
jcgregorio_google
CC:
google-api-python-client_googlegroups.com
Visibility:
Public.

Description

Filed as http://code.google.com/p/google-api-python-client/issues/detail?id=164

Patch Set 1 #

Total comments: 2

Patch Set 2 : Passing memcache instance via params #

Patch Set 3 : Simplified version without async #

Total comments: 4

Patch Set 4 : load_cached() params doc; simpler cached version #

Total comments: 6

Patch Set 5 : Typos; CacheMock init #

Total comments: 3

Patch Set 6 : Globally replacing loadfile(filename) with cache-backed version #

Total comments: 4

Patch Set 7 : Additional tests for optional 'cache' param #

Total comments: 2

Patch Set 8 : Blank lines #

Total comments: 2

Patch Set 9 : 2.4-compatible #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -11 lines) Patch
M oauth2client/appengine.py View 1 2 3 4 5 6 4 chunks +10 lines, -4 lines 0 comments Download
M oauth2client/client.py View 1 2 3 4 5 6 6 chunks +9 lines, -4 lines 0 comments Download
M oauth2client/clientsecrets.py View 1 2 3 4 5 6 2 chunks +46 lines, -1 line 0 comments Download
M tests/test_oauth2client.py View 1 2 3 4 5 6 4 chunks +40 lines, -0 lines 0 comments Download
M tests/test_oauth2client_appengine.py View 1 2 3 4 5 6 7 3 chunks +27 lines, -0 lines 0 comments Download
M tests/test_oauth2client_clientsecrets.py View 1 2 3 4 5 6 7 8 2 chunks +67 lines, -2 lines 0 comments Download

Messages

Total messages: 17
jcgregorio_google
http://codereview.appspot.com/6349087/diff/1/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/1/oauth2client/clientsecrets.py#newcode122 oauth2client/clientsecrets.py:122: from google.appengine.api import memcache Anything that depends on App ...
12 years, 12 months ago (2012-07-11 16:21:42 UTC) #1
alexv
http://codereview.appspot.com/6349087/diff/1/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/1/oauth2client/clientsecrets.py#newcode122 oauth2client/clientsecrets.py:122: from google.appengine.api import memcache On 2012/07/11 16:21:42, jcgregorio_google wrote: ...
12 years, 12 months ago (2012-07-11 18:59:35 UTC) #2
alexv
Actually, NDB doesn't pick up RPCs that were not originally registered with its autobatcher. Plus, ...
12 years, 12 months ago (2012-07-12 10:52:25 UTC) #3
jcgregorio_google
http://codereview.appspot.com/6349087/diff/2002/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/2002/oauth2client/clientsecrets.py#newcode122 oauth2client/clientsecrets.py:122: cache: a cache service client that implements get() and ...
12 years, 12 months ago (2012-07-12 12:55:01 UTC) #4
alexv
Thanks! http://codereview.appspot.com/6349087/diff/2002/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/2002/oauth2client/clientsecrets.py#newcode122 oauth2client/clientsecrets.py:122: cache: a cache service client that implements get() ...
12 years, 12 months ago (2012-07-12 14:00:41 UTC) #5
jcgregorio_google
http://codereview.appspot.com/6349087/diff/7002/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/7002/oauth2client/clientsecrets.py#newcode111 oauth2client/clientsecrets.py:111: Tipical cache storage would be App Engine memcache service, ...
12 years, 12 months ago (2012-07-12 15:37:24 UTC) #6
alexv
http://codereview.appspot.com/6349087/diff/7002/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/7002/oauth2client/clientsecrets.py#newcode111 oauth2client/clientsecrets.py:111: Tipical cache storage would be App Engine memcache service, ...
12 years, 12 months ago (2012-07-12 18:37:10 UTC) #7
jcgregorio_google
http://codereview.appspot.com/6349087/diff/10001/oauth2client/clientsecrets.py File oauth2client/clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/10001/oauth2client/clientsecrets.py#newcode108 oauth2client/clientsecrets.py:108: def load_cached(filename, cache): Sounds good to me, rename this ...
12 years, 11 months ago (2012-07-13 13:39:40 UTC) #8
alexv
The optional 'cache' param change for *FromClientSecrets is trivial but I can add some test ...
12 years, 11 months ago (2012-07-13 14:50:51 UTC) #9
jcgregorio_google
On 2012/07/13 14:50:51, crhyme wrote: > The optional 'cache' param change for *FromClientSecrets is trivial ...
12 years, 11 months ago (2012-07-13 15:24:35 UTC) #10
jcgregorio_google
http://codereview.appspot.com/6349087/diff/11002/oauth2client/appengine.py File oauth2client/appengine.py (right): http://codereview.appspot.com/6349087/diff/11002/oauth2client/appengine.py#newcode457 oauth2client/appengine.py:457: cache: an optional cache service client that implements get() ...
12 years, 11 months ago (2012-07-13 15:24:40 UTC) #11
alexv
Hopefully I got this right. http://codereview.appspot.com/6349087/diff/11002/oauth2client/appengine.py File oauth2client/appengine.py (right): http://codereview.appspot.com/6349087/diff/11002/oauth2client/appengine.py#newcode457 oauth2client/appengine.py:457: cache: an optional cache ...
12 years, 11 months ago (2012-07-13 17:47:12 UTC) #12
jcgregorio_google
http://codereview.appspot.com/6349087/diff/5011/tests/test_oauth2client_appengine.py File tests/test_oauth2client_appengine.py (right): http://codereview.appspot.com/6349087/diff/5011/tests/test_oauth2client_appengine.py#newcode78 tests/test_oauth2client_appengine.py:78: two blank lines
12 years, 11 months ago (2012-07-16 16:00:14 UTC) #13
alexv
http://codereview.appspot.com/6349087/diff/5011/tests/test_oauth2client_appengine.py File tests/test_oauth2client_appengine.py (right): http://codereview.appspot.com/6349087/diff/5011/tests/test_oauth2client_appengine.py#newcode78 tests/test_oauth2client_appengine.py:78: On 2012/07/16 16:00:14, jcgregorio_google wrote: > two blank lines ...
12 years, 11 months ago (2012-07-16 16:10:55 UTC) #14
jcgregorio_google
http://codereview.appspot.com/6349087/diff/17001/tests/test_oauth2client_clientsecrets.py File tests/test_oauth2client_clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/17001/tests/test_oauth2client_clientsecrets.py#newcode127 tests/test_oauth2client_clientsecrets.py:127: self.assertIsNone(self.cache_mock.last_set_ns) assertIsNone only works on Python 2.7, please use ...
12 years, 11 months ago (2012-07-16 16:17:15 UTC) #15
alexv
Sorry, forgot about < 2.7 http://codereview.appspot.com/6349087/diff/17001/tests/test_oauth2client_clientsecrets.py File tests/test_oauth2client_clientsecrets.py (right): http://codereview.appspot.com/6349087/diff/17001/tests/test_oauth2client_clientsecrets.py#newcode127 tests/test_oauth2client_clientsecrets.py:127: self.assertIsNone(self.cache_mock.last_set_ns) On 2012/07/16 16:17:15, ...
12 years, 11 months ago (2012-07-16 16:52:50 UTC) #16
jcgregorio_google
12 years, 11 months ago (2012-07-16 20:17:42 UTC) #17
LGTM.

Committed at
http://code.google.com/p/google-api-python-client/source/detail?r=9e3a9336962...

On 2012/07/16 16:52:50, crhyme wrote:
> Sorry, forgot about < 2.7
> 
>
http://codereview.appspot.com/6349087/diff/17001/tests/test_oauth2client_clie...
> File tests/test_oauth2client_clientsecrets.py (right):
> 
>
http://codereview.appspot.com/6349087/diff/17001/tests/test_oauth2client_clie...
> tests/test_oauth2client_clientsecrets.py:127:
> self.assertIsNone(self.cache_mock.last_set_ns)
> On 2012/07/16 16:17:15, jcgregorio_google wrote:
> > assertIsNone only works on Python 2.7, please use assertNotEqual.
> 
> Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b