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

Issue 4919049: Add fancy locking to oauth2client

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by jbeda_google
Modified:
13 years ago
Reviewers:
jcgregorio_google
CC:
google-api-python-client_googlegroups.com
Visibility:
Public.

Description

Support credential store locking in the face of high concurrency This change consists of changing the core Storage class to support locking. The OAuth2Credentials class is then changed to use this locking. It will check for newer versions of a credential before refreshing. I also fixed up some comments, style and logging. The one 'API' change is that OAuth2Credentials.set_store now takes a Storage object instead of a put method.

Patch Set 1 #

Patch Set 2 : Fix some missing changes in client.py #

Patch Set 3 : Update other storage implementations, fix naming style to match PEP 8. #

Total comments: 1

Patch Set 4 : Remove expiration based token refresh #

Total comments: 11

Patch Set 5 : Address comments from Joe #

Patch Set 6 : Stop using the term "database". Also rename new store from locked_file to multistore_file. #

Total comments: 5

Patch Set 7 : Have command line helper exit with friendly messages instead of throwing exceptions. #

Patch Set 8 : Fix appengine unit test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+568 lines, -126 lines) Patch
M oauth2client/appengine.py View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M oauth2client/client.py View 1 2 3 4 18 chunks +183 lines, -97 lines 0 comments Download
M oauth2client/django_orm.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M oauth2client/file.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
A oauth2client/multistore_file.py View 1 2 3 4 5 1 chunk +361 lines, -0 lines 0 comments Download
M oauth2client/tools.py View 1 2 3 4 5 6 5 chunks +19 lines, -23 lines 0 comments Download
M tests/test_oauth2client_appengine.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13
jcgregorio_google
http://codereview.appspot.com/4919049/diff/3001/oauth2client/client.py File oauth2client/client.py (right): http://codereview.appspot.com/4919049/diff/3001/oauth2client/client.py#newcode188 oauth2client/client.py:188: token_uri: URI of token endpoint two token_uris? http://codereview.appspot.com/4919049/diff/5004/oauth2client/client.py File ...
13 years ago (2011-08-25 16:03:20 UTC) #1
jbeda_google
I've uploaded a patch to address most of this. The biggest question is the format ...
13 years ago (2011-08-25 16:32:07 UTC) #2
jcgregorio_google
http://codereview.appspot.com/4919049/diff/5004/oauth2client/locked_file.py File oauth2client/locked_file.py (right): http://codereview.appspot.com/4919049/diff/5004/oauth2client/locked_file.py#newcode6 oauth2client/locked_file.py:6: credentials can be stored in one file. That file ...
13 years ago (2011-08-26 14:11:18 UTC) #3
jbeda_google
On 2011/08/26 14:11:18, jcgregorio_google wrote: > http://codereview.appspot.com/4919049/diff/5004/oauth2client/locked_file.py > File oauth2client/locked_file.py (right): > > http://codereview.appspot.com/4919049/diff/5004/oauth2client/locked_file.py#newcode6 > ...
13 years ago (2011-08-30 20:58:32 UTC) #4
jcgregorio_google
Yes, we are close, just two more minor issues. http://codereview.appspot.com/4919049/diff/20001/oauth2client/tools.py File oauth2client/tools.py (right): http://codereview.appspot.com/4919049/diff/20001/oauth2client/tools.py#newcode115 oauth2client/tools.py:115: ...
13 years ago (2011-08-31 18:06:55 UTC) #5
jbeda_google
Please take another look. Hopefully we are there! http://codereview.appspot.com/4919049/diff/20001/oauth2client/tools.py File oauth2client/tools.py (right): http://codereview.appspot.com/4919049/diff/20001/oauth2client/tools.py#newcode115 oauth2client/tools.py:115: httpd ...
13 years ago (2011-09-06 23:10:18 UTC) #6
jcgregorio_google
http://codereview.appspot.com/4919049/diff/20001/oauth2client/tools.py File oauth2client/tools.py (right): http://codereview.appspot.com/4919049/diff/20001/oauth2client/tools.py#newcode142 oauth2client/tools.py:142: raise UserAuthorizationError('Authentication request was rejected.') On 2011/09/06 23:10:18, jbeda ...
13 years ago (2011-09-08 15:56:06 UTC) #7
jbeda_google
I'm cool with it the way it was. If I end up *really* needing a ...
13 years ago (2011-09-09 18:09:57 UTC) #8
jcgregorio_google
LGTM
13 years ago (2011-09-09 18:46:42 UTC) #9
jcgregorio_google
I spoke too soon. When running the unit tests I now get a failure: python ...
13 years ago (2011-09-09 18:53:33 UTC) #10
jbeda_google
Ah! I ran the tests but couldn't figure out how to run the appengine test. ...
13 years ago (2011-09-09 19:25:29 UTC) #11
jbeda_google
Unit test fixed! PTAL and hopefully we are good to go.
13 years ago (2011-09-10 15:18:29 UTC) #12
jcgregorio_google
12 years, 12 months ago (2011-09-11 18:05:45 UTC) #13

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