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

Issue 7039053: Don't accept 403 by default for auth challenge. (Closed)

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

Description

Fixes issue #230.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M oauth2client/client.py View 2 chunks +4 lines, -2 lines 1 comment Download
M tests/test_oauth2client.py View 5 chunks +5 lines, -7 lines 0 comments Download

Messages

Total messages: 5
jcgregorio_google
12 years, 6 months ago (2013-01-03 20:40:40 UTC) #1
Ali Afshar
https://codereview.appspot.com/7039053/diff/1/oauth2client/client.py File oauth2client/client.py (right): https://codereview.appspot.com/7039053/diff/1/oauth2client/client.py#newcode61 oauth2client/client.py:61: REFRESH_STATUS_CODES = [401] set()
12 years, 6 months ago (2013-01-03 20:44:04 UTC) #2
jcgregorio_google
set() is not necessarily faster for small sizes sets. >>> timeit.timeit('401 in CODES', setup='CODES = ...
12 years, 6 months ago (2013-01-03 20:59:44 UTC) #3
Ali Afshar
On 2013/01/03 20:59:44, jcgregorio_google wrote: > set() is not necessarily faster for small sizes sets. ...
12 years, 6 months ago (2013-01-03 21:45:36 UTC) #4
jcgregorio_google
12 years, 6 months ago (2013-01-03 22:19:16 UTC) #5
Committed at
http://code.google.com/p/google-api-python-client/source/detail?r=accbae09fb5...

On 2013/01/03 21:45:36, Ali Afshar wrote:
> On 2013/01/03 20:59:44, jcgregorio_google wrote:
> > set() is not necessarily faster for small sizes sets.
> > 
> > >>> timeit.timeit('401 in CODES', setup='CODES = set([401])',
number=10000000)
> > 0.39968013763427734
> > >>> timeit.timeit('401 in CODES', setup='CODES = set([401, 403])',
> > number=10000000)
> > 0.40685200691223145
> > >>> timeit.timeit('401 in CODES', setup='CODES = [401]', number=10000000)
> > 0.3131840229034424
> > >>> timeit.timeit('401 in CODES', setup='CODES = [401, 403]',
number=10000000)
> > 0.3129160404205322
> > >>>
> > 
> > On Thu, Jan 3, 2013 at 3:44 PM,  <mailto:afshar@google.com> wrote:
> > >
> > > https://codereview.appspot.com/7039053/diff/1/oauth2client/client.py
> > > File oauth2client/client.py (right):
> > >
> > >
> >
https://codereview.appspot.com/7039053/diff/1/oauth2client/client.py#newcode61
> > > oauth2client/client.py:61: REFRESH_STATUS_CODES = [401]
> > > set()
> > >
> > > https://codereview.appspot.com/7039053/
> 
> Interesting, thanks. LGTM
Sign in to reply to this message.

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