summarylogtreecommitdiffstats
path: root/patch
blob: e2767ca7014e7dd2fcb639467679269c9befab9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
commit 6d08abab737ce39822b4bbb710164f9724203828
Author: Daniel M. Capella <polyzen@archlinux.info>
Date:   Mon Mar 7 16:26:48 2016 -0500

    blah

diff --git a/oauth2client/appengine.py b/oauth2client/appengine.py
index 00fe985..f273de1 100644
--- a/oauth2client/appengine.py
+++ b/oauth2client/appengine.py
@@ -35,18 +35,18 @@ from google.appengine.ext import db
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import login_required
 from google.appengine.ext.webapp.util import run_wsgi_app
-from oauth2client import GOOGLE_AUTH_URI
-from oauth2client import GOOGLE_REVOKE_URI
-from oauth2client import GOOGLE_TOKEN_URI
-from oauth2client import clientsecrets
-from oauth2client import util
-from oauth2client import xsrfutil
-from oauth2client.client import AccessTokenRefreshError
-from oauth2client.client import AssertionCredentials
-from oauth2client.client import Credentials
-from oauth2client.client import Flow
-from oauth2client.client import OAuth2WebServerFlow
-from oauth2client.client import Storage
+from oauth2client1412 import GOOGLE_AUTH_URI
+from oauth2client1412 import GOOGLE_REVOKE_URI
+from oauth2client1412 import GOOGLE_TOKEN_URI
+from oauth2client1412 import clientsecrets
+from oauth2client1412 import util
+from oauth2client1412 import xsrfutil
+from oauth2client1412.client import AccessTokenRefreshError
+from oauth2client1412.client import AssertionCredentials
+from oauth2client1412.client import Credentials
+from oauth2client1412.client import Flow
+from oauth2client1412.client import OAuth2WebServerFlow
+from oauth2client1412.client import Storage
 
 # TODO(dhermes): Resolve import issue.
 # This is a temporary fix for a Google internal issue.
@@ -58,7 +58,7 @@ except ImportError:
 
 logger = logging.getLogger(__name__)
 
-OAUTH2CLIENT_NAMESPACE = 'oauth2client#ns'
+OAUTH2CLIENT1412_NAMESPACE = 'oauth2client#ns'
 
 XSRF_MEMCACHE_ID = 'xsrf_secret_key'
 
@@ -125,7 +125,7 @@ def xsrf_secret_key():
   Returns:
     The secret key.
   """
-  secret = memcache.get(XSRF_MEMCACHE_ID, namespace=OAUTH2CLIENT_NAMESPACE)
+  secret = memcache.get(XSRF_MEMCACHE_ID, namespace=OAUTH2CLIENT1412_NAMESPACE)
   if not secret:
     # Load the one and only instance of SiteXsrfSecretKey.
     model = SiteXsrfSecretKey.get_or_insert(key_name='site')
@@ -133,7 +133,7 @@ def xsrf_secret_key():
       model.secret = _generate_new_xsrf_secret_key()
       model.put()
     secret = model.secret
-    memcache.add(XSRF_MEMCACHE_ID, secret, namespace=OAUTH2CLIENT_NAMESPACE)
+    memcache.add(XSRF_MEMCACHE_ID, secret, namespace=OAUTH2CLIENT1412_NAMESPACE)
 
   return str(secret)
 
diff --git a/oauth2client/client.py b/oauth2client/client.py
index 1d6cf42..31042bb 100644
--- a/oauth2client/client.py
+++ b/oauth2client/client.py
@@ -35,17 +35,17 @@ import six
 from six.moves import urllib
 
 import httplib2
-from oauth2client import clientsecrets
-from oauth2client import GOOGLE_AUTH_URI
-from oauth2client import GOOGLE_DEVICE_URI
-from oauth2client import GOOGLE_REVOKE_URI
-from oauth2client import GOOGLE_TOKEN_URI
-from oauth2client import util
+from oauth2client1412 import clientsecrets
+from oauth2client1412 import GOOGLE_AUTH_URI
+from oauth2client1412 import GOOGLE_DEVICE_URI
+from oauth2client1412 import GOOGLE_REVOKE_URI
+from oauth2client1412 import GOOGLE_TOKEN_URI
+from oauth2client1412 import util
 
 HAS_OPENSSL = False
 HAS_CRYPTO = False
 try:
-  from oauth2client import crypt
+  from oauth2client1412 import crypt
   HAS_CRYPTO = True
   if crypt.OpenSSLVerifier is not None:
     HAS_OPENSSL = True
@@ -1317,7 +1317,7 @@ def _get_well_known_file():
 def _get_application_default_credential_from_file(filename):
   """Build the Application Default Credentials from file."""
 
-  from oauth2client import service_account
+  from oauth2client1412 import service_account
 
   # read the credentials from the file
   with open(filename) as file_obj:
@@ -1371,13 +1371,13 @@ def _raise_exception_for_reading_json(credential_file,
 
 
 def _get_application_default_credential_GAE():
-  from oauth2client.appengine import AppAssertionCredentials
+  from oauth2client1412.appengine import AppAssertionCredentials
 
   return AppAssertionCredentials([])
 
 
 def _get_application_default_credential_GCE():
-  from oauth2client.gce import AppAssertionCredentials
+  from oauth2client1412.gce import AppAssertionCredentials
 
   return AppAssertionCredentials([])
 
diff --git a/oauth2client/clientsecrets.py b/oauth2client/clientsecrets.py
index 08a1702..ba8c2c6 100644
--- a/oauth2client/clientsecrets.py
+++ b/oauth2client/clientsecrets.py
@@ -149,7 +149,7 @@ def loadfile(filename, cache=None):
     JSON contents is validated only during first load. Cache hits are not
     validated.
   """
-  _SECRET_NAMESPACE = 'oauth2client:secrets#ns'
+  _SECRET_NAMESPACE = 'oauth2client1412:secrets#ns'
 
   if not cache:
     return _loadfile(filename)
diff --git a/oauth2client/devshell.py b/oauth2client/devshell.py
index a33de87..c4bd882 100644
--- a/oauth2client/devshell.py
+++ b/oauth2client/devshell.py
@@ -17,7 +17,7 @@
 import json
 import os
 
-from oauth2client import client
+from oauth2client1412 import client
 
 
 DEVSHELL_ENV = 'DEVSHELL_CLIENT_PORT'
diff --git a/oauth2client/django_orm.py b/oauth2client/django_orm.py
index 65c5d20..1f2b5e2 100644
--- a/oauth2client/django_orm.py
+++ b/oauth2client/django_orm.py
@@ -20,12 +20,12 @@ the Django datastore.
 
 __author__ = 'jcgregorio@google.com (Joe Gregorio)'
 
-import oauth2client
+import oauth2client1412
 import base64
 import pickle
 
 from django.db import models
-from oauth2client.client import Storage as BaseStorage
+from oauth2client1412.client import Storage as BaseStorage
 
 class CredentialsField(models.Field):
 
@@ -42,7 +42,7 @@ class CredentialsField(models.Field):
   def to_python(self, value):
     if value is None:
       return None
-    if isinstance(value, oauth2client.client.Credentials):
+    if isinstance(value, oauth2client1412.client.Credentials):
       return value
     return pickle.loads(base64.b64decode(value))
 
@@ -67,7 +67,7 @@ class FlowField(models.Field):
   def to_python(self, value):
     if value is None:
       return None
-    if isinstance(value, oauth2client.client.Flow):
+    if isinstance(value, oauth2client1412.client.Flow):
       return value
     return pickle.loads(base64.b64decode(value))
 
diff --git a/oauth2client/file.py b/oauth2client/file.py
index 9d0ae7f..e7c73e5 100644
--- a/oauth2client/file.py
+++ b/oauth2client/file.py
@@ -23,8 +23,8 @@ __author__ = 'jcgregorio@google.com (Joe Gregorio)'
 import os
 import threading
 
-from oauth2client.client import Credentials
-from oauth2client.client import Storage as BaseStorage
+from oauth2client1412.client import Credentials
+from oauth2client1412.client import Storage as BaseStorage
 
 
 class CredentialsFileSymbolicLinkError(Exception):
diff --git a/oauth2client/gce.py b/oauth2client/gce.py
index fc3bd77..79f0512 100644
--- a/oauth2client/gce.py
+++ b/oauth2client/gce.py
@@ -23,9 +23,9 @@ import json
 import logging
 from six.moves import urllib
 
-from oauth2client import util
-from oauth2client.client import AccessTokenRefreshError
-from oauth2client.client import AssertionCredentials
+from oauth2client1412 import util
+from oauth2client1412.client import AccessTokenRefreshError
+from oauth2client1412.client import AssertionCredentials
 
 logger = logging.getLogger(__name__)
 
diff --git a/oauth2client/keyring_storage.py b/oauth2client/keyring_storage.py
index cda1d9a..d7f7f6f 100644
--- a/oauth2client/keyring_storage.py
+++ b/oauth2client/keyring_storage.py
@@ -23,8 +23,8 @@ import threading
 
 import keyring
 
-from oauth2client.client import Credentials
-from oauth2client.client import Storage as BaseStorage
+from oauth2client1412.client import Credentials
+from oauth2client1412.client import Storage as BaseStorage
 
 
 class Storage(BaseStorage):
diff --git a/oauth2client/locked_file.py b/oauth2client/locked_file.py
index af92398..b5d1b07 100644
--- a/oauth2client/locked_file.py
+++ b/oauth2client/locked_file.py
@@ -39,7 +39,7 @@ import logging
 import os
 import time
 
-from oauth2client import util
+from oauth2client1412 import util
 
 logger = logging.getLogger(__name__)
 
diff --git a/oauth2client/multistore_file.py b/oauth2client/multistore_file.py
index f4ba4a7..0da1e14 100644
--- a/oauth2client/multistore_file.py
+++ b/oauth2client/multistore_file.py
@@ -52,10 +52,10 @@ import logging
 import os
 import threading
 
-from oauth2client.client import Credentials
-from oauth2client.client import Storage as BaseStorage
-from oauth2client import util
-from oauth2client.locked_file import LockedFile
+from oauth2client1412.client import Credentials
+from oauth2client1412.client import Storage as BaseStorage
+from oauth2client1412 import util
+from oauth2client1412.locked_file import LockedFile
 
 logger = logging.getLogger(__name__)
 
diff --git a/oauth2client/old_run.py b/oauth2client/old_run.py
index 51db69b..93c9742 100644
--- a/oauth2client/old_run.py
+++ b/oauth2client/old_run.py
@@ -25,10 +25,10 @@ import webbrowser
 import gflags
 from six.moves import input
 
-from oauth2client import client
-from oauth2client import util
-from oauth2client.tools import ClientRedirectHandler
-from oauth2client.tools import ClientRedirectServer
+from oauth2client1412 import client
+from oauth2client1412 import util
+from oauth2client1412.tools import ClientRedirectHandler
+from oauth2client1412.tools import ClientRedirectServer
 
 
 FLAGS = gflags.FLAGS
diff --git a/oauth2client/service_account.py b/oauth2client/service_account.py
index d1d1d89..400c494 100644
--- a/oauth2client/service_account.py
+++ b/oauth2client/service_account.py
@@ -26,10 +26,10 @@ from pyasn1.codec.ber import decoder
 from pyasn1_modules.rfc5208 import PrivateKeyInfo
 import rsa
 
-from oauth2client import GOOGLE_REVOKE_URI
-from oauth2client import GOOGLE_TOKEN_URI
-from oauth2client import util
-from oauth2client.client import AssertionCredentials
+from oauth2client1412 import GOOGLE_REVOKE_URI
+from oauth2client1412 import GOOGLE_TOKEN_URI
+from oauth2client1412 import util
+from oauth2client1412.client import AssertionCredentials
 
 
 class _ServiceAccountCredentials(AssertionCredentials):
diff --git a/oauth2client/tools.py b/oauth2client/tools.py
index 2caa134..e0141f9 100644
--- a/oauth2client/tools.py
+++ b/oauth2client/tools.py
@@ -32,8 +32,8 @@ from six.moves import BaseHTTPServer
 from six.moves import urllib
 from six.moves import input
 
-from oauth2client import client
-from oauth2client import util
+from oauth2client1412 import client
+from oauth2client1412 import util
 
 
 _CLIENT_SECRETS_MESSAGE = """WARNING: Please configure OAuth 2.0
@@ -239,8 +239,8 @@ def message_if_missing(filename):
   return _CLIENT_SECRETS_MESSAGE % filename
 
 try:
-  from oauth2client.old_run import run
-  from oauth2client.old_run import FLAGS
+  from oauth2client1412.old_run import run
+  from oauth2client1412.old_run import FLAGS
 except ImportError:
   def run(*args, **kwargs):
     raise NotImplementedError(
diff --git a/oauth2client/xsrfutil.py b/oauth2client/xsrfutil.py
index 5739dcf..039a3b2 100644
--- a/oauth2client/xsrfutil.py
+++ b/oauth2client/xsrfutil.py
@@ -26,7 +26,7 @@ import hmac
 import time
 
 import six
-from oauth2client import util
+from oauth2client1412 import util
 
 
 # Delimiter character
diff --git a/setup.py b/setup.py
index 66e619f..14fab22 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ if (3, 1) <= sys.version_info < (3, 3):
 from setuptools import setup
 
 packages = [
-    'oauth2client',
+    'oauth2client1412',
 ]
 
 install_requires = [
@@ -44,16 +44,16 @@ install_requires = [
 
 long_desc = """The oauth2client is a client library for OAuth 2.0."""
 
-import oauth2client
-version = oauth2client.__version__
+import oauth2client1412
+version = oauth2client1412.__version__
 
 setup(
-    name="oauth2client",
+    name="oauth2client1412",
     version=version,
     description="OAuth 2.0 client library",
     long_description=long_desc,
     author="Google Inc.",
-    url="http://github.com/google/oauth2client/",
+    url="http://github.com/polyzen/oauth2client/",
     install_requires=install_requires,
     packages=packages,
     license="Apache 2.0",