diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-06-14 23:55:32 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-06-14 23:56:44 -0400 |
commit | 28ab49214e04334902210ec62c8d0ed84c422397 (patch) | |
tree | 38fe9187a64c500a9829a89b91ce845ab4dca7a9 /dev-python/gcs-oauth2-boto-plugin/files | |
parent | dev-python/gcs-oauth2-boto-plugin: block oauth2client-2 (diff) | |
download | gentoo-28ab49214e04334902210ec62c8d0ed84c422397.tar.gz gentoo-28ab49214e04334902210ec62c8d0ed84c422397.tar.bz2 gentoo-28ab49214e04334902210ec62c8d0ed84c422397.zip |
dev-python/gcs-oauth2-boto-plugin: version bump to 1.13
Diffstat (limited to 'dev-python/gcs-oauth2-boto-plugin/files')
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-python/gcs-oauth2-boto-plugin/files/gcs-oauth2-boto-plugin-1.13-py3.patch b/dev-python/gcs-oauth2-boto-plugin/files/gcs-oauth2-boto-plugin-1.13-py3.patch new file mode 100644 index 000000000000..15f6fc373779 --- /dev/null +++ b/dev-python/gcs-oauth2-boto-plugin/files/gcs-oauth2-boto-plugin-1.13-py3.patch @@ -0,0 +1,60 @@ +https://github.com/GoogleCloudPlatform/gcs-oauth2-boto-plugin/pull/18 + +--- a/gcs_oauth2_boto_plugin/oauth2_client.py ++++ b/gcs_oauth2_boto_plugin/oauth2_client.py +@@ -122,7 +122,7 @@ except ImportError: + retval.token_expiry = datetime.datetime.strptime( + data['token_expiry'], EXPIRY_FORMAT) + return retval +- except KeyError, e: ++ except KeyError as e: + raise Exception('Your JSON credentials are invalid; ' + 'missing required entry %s.' % e[0]) + # pylint: enable=protected-access +@@ -274,7 +274,7 @@ class FileSystemTokenCache(TokenCache): + flags |= os.O_BINARY + + try: +- fd = os.open(cache_file, flags, 0600) ++ fd = os.open(cache_file, flags, 0o0600) + except (OSError, IOError) as e: + LOG.warning('FileSystemTokenCache.PutToken: ' + 'Failed to create cache file %s: %s', cache_file, e) +@@ -633,7 +633,7 @@ class OAuth2UserAccountClient(OAuth2Client): + return AccessToken( + credentials.access_token, credentials.token_expiry, + datetime_strategy=self.datetime_strategy) +- except AccessTokenRefreshError, e: ++ except AccessTokenRefreshError as e: + if 'Invalid response 403' in e.message: + # This is the most we can do at the moment to accurately detect rate + # limiting errors since they come back as 403s with no further +@@ -669,7 +669,7 @@ class OAuth2GCEClient(OAuth2Client): + http = httplib2.Http() + response, content = http.request(META_TOKEN_URI, method='GET', + body=None, headers=META_HEADERS) +- except Exception, e: ++ except Exception as e: + raise GsAccessTokenRefreshError(e) + + if response.status == 200: +@@ -695,7 +695,7 @@ def _IsGCE(): + # this approach, we'll avoid having to enumerate all possible non-transient + # socket errors. + return False +- except Exception, e: # pylint: disable=broad-except ++ except Exception as e: # pylint: disable=broad-except + LOG.warning("Failed to determine whether we're running on GCE, so we'll" + "assume that we aren't: %s", e) + return False +--- a/gcs_oauth2_boto_plugin/test_oauth2_client.py ++++ b/gcs_oauth2_boto_plugin/test_oauth2_client.py +@@ -248,7 +248,7 @@ class FileSystemTokenCacheTest(unittest.TestCase): + # Assert that the cache file exists and has correct permissions. + if not IS_WINDOWS: + self.assertEquals( +- 0600, ++ 0o0600, + stat.S_IMODE(os.stat(self.cache.CacheFileName(self.key)).st_mode)) + + def testPutGet(self): diff --git a/dev-python/gcs-oauth2-boto-plugin/files/gcs-oauth2-boto-plugin-1.13-use-friendy-version-checks.patch b/dev-python/gcs-oauth2-boto-plugin/files/gcs-oauth2-boto-plugin-1.13-use-friendy-version-checks.patch new file mode 100644 index 000000000000..334ee5e90c96 --- /dev/null +++ b/dev-python/gcs-oauth2-boto-plugin/files/gcs-oauth2-boto-plugin-1.13-use-friendy-version-checks.patch @@ -0,0 +1,13 @@ +--- a/setup.py ++++ b/setup.py +@@ -36,9 +36,7 @@ + 'httplib2>=0.8', + 'oauth2client>=1.5.2, !=2.0.*', + 'pyOpenSSL>=0.13', +- # Not using 1.02 because of: +- # https://code.google.com/p/socksipy-branch/issues/detail?id=3 +- 'SocksiPy-branch==1.01', ++ 'SocksiPy-branch>=1.01', + 'retry_decorator>=1.0.0', + 'six>=1.6.1' + ] |