Hello community,

here is the log from the commit of package python-google-api-python-client for 
openSUSE:Factory checked in at 2018-05-30 12:23:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-api-python-client (Old)
 and      /work/SRC/openSUSE:Factory/.python-google-api-python-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-google-api-python-client"

Wed May 30 12:23:48 2018 rev:5 rq:612922 version:1.6.7

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-google-api-python-client/python-google-api-python-client.changes
  2017-10-09 19:40:58.774680524 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-google-api-python-client.new/python-google-api-python-client.changes
     2018-05-30 12:37:57.499127521 +0200
@@ -1,0 +2,29 @@
+Tue May 29 18:36:55 UTC 2018 - tbecht...@suse.com
+
+- update to 1.6.7:
+  - Make body optional for requests with no parameters. (#446)
+  - Fix retying on socket.timeout. (#495)
+  - Match travis matrix with tox testenv. (#498)
+  - Remove oauth2client._helpers dependency. (#493)
+  - Remove unused keyring test dependency. (#496)
+  - discovery.py: remove unused oauth2client import. (#492)
+  - Update README to reference GCP API client libraries. (#490)
+  - Warn when constructing BatchHttpRequest using the legacy batch URI (#488)
+  - Increase the default media chunksize to 100MB. (#482)
+  - Remove unnecessary parsing of mime headers in HttpRequest.__init__ (#467)
+  - Proactively refresh credentials when applying and treat a missing
+    `access_token` as invalid. Note: This change reveals surprising behavior
+    between default credentials and batches. If you allow
+    `googleapiclient.discovery.build` to use default credentials *and* specify
+    different credentials by providing `batch.execut()` with an explicit `http`
+    argument, your individual requests will use the default credentials and
+    *not* the credentials specified to the batch http. To avoid this, tell
+    `build` explicitly not to use default credentials by specifying
+    `build(..., http=httplib2.Http()`. (#469)
+  - Remove mutual exclusivity check for developerKey and credentials (#465)
+  - Handle unknown media length. (#406)
+  - Handle variant error format gracefully. (#459)
+  - Avoid testing against Django >= 2.0.0 on Python 2. (#460)
+- Use %license
+
+-------------------------------------------------------------------

Old:
----
  google-api-python-client-1.6.4.tar.gz

New:
----
  google-api-python-client-1.6.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-google-api-python-client.spec ++++++
--- /var/tmp/diff_new_pack.gN7bL9/_old  2018-05-30 12:37:58.123107644 +0200
+++ /var/tmp/diff_new_pack.gN7bL9/_new  2018-05-30 12:37:58.127107517 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-google-api-python-client
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-google-api-python-client
-Version:        1.6.4
+Version:        1.6.7
 Release:        0
 Summary:        Google APIs Python Client
 License:        Apache-2.0
@@ -77,7 +77,8 @@
 
 %files %{python_files}
 %defattr(-,root,root,-)
-%doc CHANGELOG LICENSE
+%doc CHANGELOG
+%license LICENSE
 %{python_sitelib}/*
 
 %changelog

++++++ google-api-python-client-1.6.4.tar.gz -> 
google-api-python-client-1.6.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/google-api-python-client-1.6.4/CHANGELOG 
new/google-api-python-client-1.6.7/CHANGELOG
--- old/google-api-python-client-1.6.4/CHANGELOG        2017-09-20 
17:54:26.000000000 +0200
+++ new/google-api-python-client-1.6.7/CHANGELOG        2018-04-27 
22:59:17.000000000 +0200
@@ -1,3 +1,48 @@
+v1.6.7
+  Version 1.6.7
+
+  Bugfix release
+
+  **Note**: The next release of this library will no longer directly depend on
+    oauth2client. If you need to use oauth2client, you'll need to explicitly
+    install it.
+
+  - Make body optional for requests with no parameters. (#446)
+  - Fix retying on socket.timeout. (#495)
+  - Match travis matrix with tox testenv. (#498)
+  - Remove oauth2client._helpers dependency. (#493)
+  - Remove unused keyring test dependency. (#496)
+  - discovery.py: remove unused oauth2client import. (#492)
+  - Update README to reference GCP API client libraries. (#490)
+
+v1.6.6
+  Version 1.6.6
+
+  Bugfix release
+
+  - Warn when constructing BatchHttpRequest using the legacy batch URI (#488)
+  - Increase the default media chunksize to 100MB. (#482)
+  - Remove unnecessary parsing of mime headers in HttpRequest.__init__ (#467)
+
+v1.6.5
+  Version 1.6.5
+
+  Bugfix release
+
+  - Proactively refresh credentials when applying and treat a missing
+    `access_token` as invalid. Note: This change reveals surprising behavior
+    between default credentials and batches. If you allow
+    `googleapiclient.discovery.build` to use default credentials *and* specify
+    different credentials by providing `batch.execut()` with an explicit `http`
+    argument, your individual requests will use the default credentials and
+    *not* the credentials specified to the batch http. To avoid this, tell
+    `build` explicitly not to use default credentials by specifying
+    `build(..., http=httplib2.Http()`. (#469)
+  - Remove mutual exclusivity check for developerKey and credentials (#465)
+  - Handle unknown media length. (#406)
+  - Handle variant error format gracefully. (#459)
+  - Avoid testing against Django >= 2.0.0 on Python 2. (#460)
+
 v1.6.4
   Version 1.6.4
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/google-api-python-client-1.6.4/PKG-INFO 
new/google-api-python-client-1.6.7/PKG-INFO
--- old/google-api-python-client-1.6.4/PKG-INFO 2017-09-20 17:57:53.000000000 
+0200
+++ new/google-api-python-client-1.6.7/PKG-INFO 2018-04-27 23:00:12.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: google-api-python-client
-Version: 1.6.4
+Version: 1.6.7
 Summary: Google API Client Library for Python
 Home-page: http://github.com/google/google-api-python-client/
 Author: Google Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/google-api-python-client-1.6.4/README.md 
new/google-api-python-client-1.6.7/README.md
--- old/google-api-python-client-1.6.4/README.md        1970-01-01 
01:00:00.000000000 +0100
+++ new/google-api-python-client-1.6.7/README.md        2018-04-24 
01:12:23.000000000 +0200
@@ -0,0 +1,38 @@
+# Google API Client
+
+This is the Python client library for Google's discovery based APIs. To get 
started, please see the [full documentation for this 
library](http://google.github.io/google-api-python-client). Additionally, 
[dynamically generated 
documentation](http://api-python-client-doc.appspot.com/) is available for all 
of the APIs supported by this library.
+
+These client libraries are officially supported by Google.  However, the 
libraries are considered complete and are in maintenance mode. This means that 
we will address critical bugs and security issues but will not add any new 
features.
+
+## Google Cloud Platform
+
+For Google Cloud Platform APIs such as Datastore, Cloud Storage or Pub/Sub, we 
recommend using [Cloud Client Libraries for 
Python](https://github.com/GoogleCloudPlatform/google-cloud-python) which is 
under active development.
+
+# Installation
+To install, simply use `pip` or `easy_install`:
+
+```bash
+$ pip install --upgrade google-api-python-client
+```
+or
+```bash
+$ easy_install --upgrade google-api-python-client
+```
+
+See the [Developers 
Guide](https://developers.google.com/api-client-library/python/start/get_started)
 for more detailed instructions and additional documentation.
+
+# Python Version
+Python 2.7, 3.4, 3.5, and 3.6 are fully supported and tested. This library may 
work on later versions of 3, but we do not currently run tests against those 
versions.
+
+# Third Party Libraries and Dependencies
+The following libraries will be installed when you install the client library:
+* [httplib2](https://github.com/httplib2/httplib2)
+* [uritemplate](https://github.com/sigmavirus24/uritemplate)
+
+For development you will also need the following libraries:
+* [WebTest](http://webtest.pythonpaste.org/en/latest/index.html)
+* [pycrypto](https://pypi.python.org/pypi/pycrypto)
+* [pyopenssl](https://pypi.python.org/pypi/pyOpenSSL)
+
+# Contributing
+Please see the [contributing 
page](http://google.github.io/google-api-python-client/contributing.html) for 
more information. In particular, we love pull requests - but please make sure 
to sign the contributor license agreement.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/google_api_python_client.egg-info/PKG-INFO 
new/google-api-python-client-1.6.7/google_api_python_client.egg-info/PKG-INFO
--- 
old/google-api-python-client-1.6.4/google_api_python_client.egg-info/PKG-INFO   
    2017-09-20 17:57:53.000000000 +0200
+++ 
new/google-api-python-client-1.6.7/google_api_python_client.egg-info/PKG-INFO   
    2018-04-27 23:00:12.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: google-api-python-client
-Version: 1.6.4
+Version: 1.6.7
 Summary: Google API Client Library for Python
 Home-page: http://github.com/google/google-api-python-client/
 Author: Google Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/google_api_python_client.egg-info/SOURCES.txt
 
new/google-api-python-client-1.6.7/google_api_python_client.egg-info/SOURCES.txt
--- 
old/google-api-python-client-1.6.4/google_api_python_client.egg-info/SOURCES.txt
    2017-09-20 17:57:53.000000000 +0200
+++ 
new/google-api-python-client-1.6.7/google_api_python_client.egg-info/SOURCES.txt
    2018-04-27 23:00:12.000000000 +0200
@@ -1,6 +1,7 @@
 CHANGELOG
 LICENSE
 MANIFEST.in
+README.md
 setup.py
 apiclient/__init__.py
 google_api_python_client.egg-info/PKG-INFO
@@ -10,6 +11,7 @@
 google_api_python_client.egg-info/top_level.txt
 googleapiclient/__init__.py
 googleapiclient/_auth.py
+googleapiclient/_helpers.py
 googleapiclient/channel.py
 googleapiclient/discovery.py
 googleapiclient/errors.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/__init__.py 
new/google-api-python-client-1.6.7/googleapiclient/__init__.py
--- old/google-api-python-client-1.6.4/googleapiclient/__init__.py      
2017-09-20 17:54:26.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/__init__.py      
2018-04-27 22:59:17.000000000 +0200
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__version__ = "1.6.4"
+__version__ = "1.6.7"
 
 # Set default logging handler to avoid "No handler found" warnings.
 import logging
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/_auth.py 
new/google-api-python-client-1.6.7/googleapiclient/_auth.py
--- old/google-api-python-client-1.6.4/googleapiclient/_auth.py 2017-09-20 
03:41:21.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/_auth.py 2018-01-18 
18:28:10.000000000 +0100
@@ -120,6 +120,8 @@
 
 def apply_credentials(credentials, headers):
     # oauth2client and google-auth have the same interface for this.
+    if not is_valid(credentials):
+        refresh_credentials(credentials)
     return credentials.apply(headers)
 
 
@@ -128,7 +130,9 @@
             credentials, google.auth.credentials.Credentials):
         return credentials.valid
     else:
-        return not credentials.access_token_expired
+        return (
+            credentials.access_token is not None and
+            not credentials.access_token_expired)
 
 
 def get_credentials_from_http(http):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/_helpers.py 
new/google-api-python-client-1.6.7/googleapiclient/_helpers.py
--- old/google-api-python-client-1.6.4/googleapiclient/_helpers.py      
1970-01-01 01:00:00.000000000 +0100
+++ new/google-api-python-client-1.6.7/googleapiclient/_helpers.py      
2018-04-27 22:44:00.000000000 +0200
@@ -0,0 +1,204 @@
+# Copyright 2015 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Helper functions for commonly used utilities."""
+
+import functools
+import inspect
+import logging
+import warnings
+
+import six
+from six.moves import urllib
+
+
+logger = logging.getLogger(__name__)
+
+POSITIONAL_WARNING = 'WARNING'
+POSITIONAL_EXCEPTION = 'EXCEPTION'
+POSITIONAL_IGNORE = 'IGNORE'
+POSITIONAL_SET = frozenset([POSITIONAL_WARNING, POSITIONAL_EXCEPTION,
+                            POSITIONAL_IGNORE])
+
+positional_parameters_enforcement = POSITIONAL_WARNING
+
+_SYM_LINK_MESSAGE = 'File: {0}: Is a symbolic link.'
+_IS_DIR_MESSAGE = '{0}: Is a directory'
+_MISSING_FILE_MESSAGE = 'Cannot access {0}: No such file or directory'
+
+
+def positional(max_positional_args):
+    """A decorator to declare that only the first N arguments my be positional.
+
+    This decorator makes it easy to support Python 3 style keyword-only
+    parameters. For example, in Python 3 it is possible to write::
+
+        def fn(pos1, *, kwonly1=None, kwonly1=None):
+            ...
+
+    All named parameters after ``*`` must be a keyword::
+
+        fn(10, 'kw1', 'kw2')  # Raises exception.
+        fn(10, kwonly1='kw1')  # Ok.
+
+    Example
+    ^^^^^^^
+
+    To define a function like above, do::
+
+        @positional(1)
+        def fn(pos1, kwonly1=None, kwonly2=None):
+            ...
+
+    If no default value is provided to a keyword argument, it becomes a
+    required keyword argument::
+
+        @positional(0)
+        def fn(required_kw):
+            ...
+
+    This must be called with the keyword parameter::
+
+        fn()  # Raises exception.
+        fn(10)  # Raises exception.
+        fn(required_kw=10)  # Ok.
+
+    When defining instance or class methods always remember to account for
+    ``self`` and ``cls``::
+
+        class MyClass(object):
+
+            @positional(2)
+            def my_method(self, pos1, kwonly1=None):
+                ...
+
+            @classmethod
+            @positional(2)
+            def my_method(cls, pos1, kwonly1=None):
+                ...
+
+    The positional decorator behavior is controlled by
+    ``_helpers.positional_parameters_enforcement``, which may be set to
+    ``POSITIONAL_EXCEPTION``, ``POSITIONAL_WARNING`` or
+    ``POSITIONAL_IGNORE`` to raise an exception, log a warning, or do
+    nothing, respectively, if a declaration is violated.
+
+    Args:
+        max_positional_arguments: Maximum number of positional arguments. All
+                                  parameters after the this index must be
+                                  keyword only.
+
+    Returns:
+        A decorator that prevents using arguments after max_positional_args
+        from being used as positional parameters.
+
+    Raises:
+        TypeError: if a key-word only argument is provided as a positional
+                   parameter, but only if
+                   _helpers.positional_parameters_enforcement is set to
+                   POSITIONAL_EXCEPTION.
+    """
+
+    def positional_decorator(wrapped):
+        @functools.wraps(wrapped)
+        def positional_wrapper(*args, **kwargs):
+            if len(args) > max_positional_args:
+                plural_s = ''
+                if max_positional_args != 1:
+                    plural_s = 's'
+                message = ('{function}() takes at most {args_max} positional '
+                           'argument{plural} ({args_given} given)'.format(
+                               function=wrapped.__name__,
+                               args_max=max_positional_args,
+                               args_given=len(args),
+                               plural=plural_s))
+                if positional_parameters_enforcement == POSITIONAL_EXCEPTION:
+                    raise TypeError(message)
+                elif positional_parameters_enforcement == POSITIONAL_WARNING:
+                    logger.warning(message)
+            return wrapped(*args, **kwargs)
+        return positional_wrapper
+
+    if isinstance(max_positional_args, six.integer_types):
+        return positional_decorator
+    else:
+        args, _, _, defaults = inspect.getargspec(max_positional_args)
+        return positional(len(args) - len(defaults))(max_positional_args)
+
+
+def parse_unique_urlencoded(content):
+    """Parses unique key-value parameters from urlencoded content.
+
+    Args:
+        content: string, URL-encoded key-value pairs.
+
+    Returns:
+        dict, The key-value pairs from ``content``.
+
+    Raises:
+        ValueError: if one of the keys is repeated.
+    """
+    urlencoded_params = urllib.parse.parse_qs(content)
+    params = {}
+    for key, value in six.iteritems(urlencoded_params):
+        if len(value) != 1:
+            msg = ('URL-encoded content contains a repeated value:'
+                   '%s -> %s' % (key, ', '.join(value)))
+            raise ValueError(msg)
+        params[key] = value[0]
+    return params
+
+
+def update_query_params(uri, params):
+    """Updates a URI with new query parameters.
+
+    If a given key from ``params`` is repeated in the ``uri``, then
+    the URI will be considered invalid and an error will occur.
+
+    If the URI is valid, then each value from ``params`` will
+    replace the corresponding value in the query parameters (if
+    it exists).
+
+    Args:
+        uri: string, A valid URI, with potential existing query parameters.
+        params: dict, A dictionary of query parameters.
+
+    Returns:
+        The same URI but with the new query parameters added.
+    """
+    parts = urllib.parse.urlparse(uri)
+    query_params = parse_unique_urlencoded(parts.query)
+    query_params.update(params)
+    new_query = urllib.parse.urlencode(query_params)
+    new_parts = parts._replace(query=new_query)
+    return urllib.parse.urlunparse(new_parts)
+
+
+def _add_query_parameter(url, name, value):
+    """Adds a query parameter to a url.
+
+    Replaces the current value if it already exists in the URL.
+
+    Args:
+        url: string, url to add the query parameter to.
+        name: string, query parameter name.
+        value: string, query parameter value.
+
+    Returns:
+        Updated query parameter. Does not update the url if value is None.
+    """
+    if value is None:
+        return url
+    else:
+        return update_query_params(url, {name: value})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/channel.py 
new/google-api-python-client-1.6.7/googleapiclient/channel.py
--- old/google-api-python-client-1.6.4/googleapiclient/channel.py       
2017-03-30 21:50:34.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/channel.py       
2018-04-27 22:44:00.000000000 +0200
@@ -61,15 +61,9 @@
 import uuid
 
 from googleapiclient import errors
+from googleapiclient import _helpers as util
 import six
 
-# Oauth2client < 3 has the positional helper in 'util', >= 3 has it
-# in '_helpers'.
-try:
-  from oauth2client import util
-except ImportError:
-  from oauth2client import _helpers as util
-
 
 # The unix time epoch starts at midnight 1970.
 EPOCH = datetime.datetime.utcfromtimestamp(0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/discovery.py 
new/google-api-python-client-1.6.7/googleapiclient/discovery.py
--- old/google-api-python-client-1.6.4/googleapiclient/discovery.py     
2017-03-30 21:50:34.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/discovery.py     
2018-04-27 22:44:00.000000000 +0200
@@ -72,16 +72,9 @@
 from googleapiclient.model import MediaModel
 from googleapiclient.model import RawModel
 from googleapiclient.schema import Schemas
-from oauth2client.client import GoogleCredentials
 
-# Oauth2client < 3 has the positional helper in 'util', >= 3 has it
-# in '_helpers'.
-try:
-  from oauth2client.util import _add_query_parameter
-  from oauth2client.util import positional
-except ImportError:
-  from oauth2client._helpers import _add_query_parameter
-  from oauth2client._helpers import positional
+from googleapiclient._helpers import _add_query_parameter
+from googleapiclient._helpers import positional
 
 
 # The client library requires a version of httplib2 that supports RETRIES.
@@ -139,7 +132,7 @@
     name: string, method name.
 
   Returns:
-    The name with a '_' prefixed if the name is a reserved word.
+    The name with an '_' appended if the name is a reserved word.
   """
   if keyword.iskeyword(name) or name in RESERVED_WORDS:
     return name + '_'
@@ -334,10 +327,6 @@
   if http is not None and credentials is not None:
     raise ValueError('Arguments http and credentials are mutually exclusive.')
 
-  if developerKey is not None and credentials is not None:
-    raise ValueError(
-      'Arguments developerKey and credentials are mutually exclusive.')
-
   if isinstance(service, six.string_types):
     service = json.loads(service)
 
@@ -459,7 +448,7 @@
   }
 
 
-def _fix_up_parameters(method_desc, root_desc, http_method):
+def _fix_up_parameters(method_desc, root_desc, http_method, schema):
   """Updates parameters of an API method with values specific to this library.
 
   Specifically, adds whatever global parameters are specified by the API to the
@@ -477,6 +466,7 @@
     root_desc: Dictionary; the entire original deserialized discovery document.
     http_method: String; the HTTP method used to call the API method described
         in method_desc.
+    schema: Object, mapping of schema names to schema descriptions.
 
   Returns:
     The updated Dictionary stored in the 'parameters' key of the method
@@ -497,6 +487,9 @@
   if http_method in HTTP_PAYLOAD_METHODS and 'request' in method_desc:
     body = BODY_PARAMETER_DEFAULT_VALUE.copy()
     body.update(method_desc['request'])
+    # Make body optional for requests with no parameters.
+    if not _methodProperties(method_desc, schema, 'request'):
+      body['required'] = False
     parameters['body'] = body
 
   return parameters
@@ -547,7 +540,7 @@
   return accept, max_size, media_path_url
 
 
-def _fix_up_method_description(method_desc, root_desc):
+def _fix_up_method_description(method_desc, root_desc, schema):
   """Updates a method description in a discovery document.
 
   SIDE EFFECTS: Changes the parameters dictionary in the method description 
with
@@ -558,6 +551,7 @@
         from the dictionary of methods stored in the 'methods' key in the
         deserialized discovery document.
     root_desc: Dictionary; the entire original deserialized discovery document.
+    schema: Object, mapping of schema names to schema descriptions.
 
   Returns:
     Tuple (path_url, http_method, method_id, accept, max_size, media_path_url)
@@ -582,7 +576,7 @@
   http_method = method_desc['httpMethod']
   method_id = method_desc['id']
 
-  parameters = _fix_up_parameters(method_desc, root_desc, http_method)
+  parameters = _fix_up_parameters(method_desc, root_desc, http_method, schema)
   # Order is important. `_fix_up_media_upload` needs `method_desc` to have a
   # 'parameters' key and needs to know if there is a 'body' parameter because 
it
   # also sets a 'media_body' parameter.
@@ -710,7 +704,7 @@
   """
   methodName = fix_method_name(methodName)
   (pathUrl, httpMethod, methodId, accept,
-   maxSize, mediaPathUrl) = _fix_up_method_description(methodDesc, rootDesc)
+   maxSize, mediaPathUrl) = _fix_up_method_description(methodDesc, rootDesc, 
schema)
 
   parameters = ResourceMethodParameters(methodDesc)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/errors.py 
new/google-api-python-client-1.6.7/googleapiclient/errors.py
--- old/google-api-python-client-1.6.4/googleapiclient/errors.py        
2017-08-02 21:36:39.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/errors.py        
2018-04-27 22:44:00.000000000 +0200
@@ -23,12 +23,7 @@
 
 import json
 
-# Oauth2client < 3 has the positional helper in 'util', >= 3 has it
-# in '_helpers'.
-try:
-  from oauth2client import util
-except ImportError:
-  from oauth2client import _helpers as util
+from googleapiclient import _helpers as util
 
 
 class Error(Exception):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/http.py 
new/google-api-python-client-1.6.7/googleapiclient/http.py
--- old/google-api-python-client-1.6.4/googleapiclient/http.py  2017-08-03 
17:55:12.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/http.py  2018-04-27 
22:44:00.000000000 +0200
@@ -55,15 +55,9 @@
 from email.mime.nonmultipart import MIMENonMultipart
 from email.parser import FeedParser
 
-# Oauth2client < 3 has the positional helper in 'util', >= 3 has it
-# in '_helpers'.
-try:
-  from oauth2client import util
-except ImportError:
-  from oauth2client import _helpers as util
+from googleapiclient import _helpers as util
 
 from googleapiclient import _auth
-from googleapiclient import mimeparse
 from googleapiclient.errors import BatchError
 from googleapiclient.errors import HttpError
 from googleapiclient.errors import InvalidChunkSizeError
@@ -75,7 +69,7 @@
 
 LOGGER = logging.getLogger(__name__)
 
-DEFAULT_CHUNK_SIZE = 512*1024
+DEFAULT_CHUNK_SIZE = 100*1024*1024
 
 MAX_URI_LENGTH = 2048
 
@@ -83,13 +77,15 @@
 
 DEFAULT_HTTP_TIMEOUT_SEC = 60
 
+_LEGACY_BATCH_URI = 'https://www.googleapis.com/batch'
+
 
 def _should_retry_response(resp_status, content):
   """Determines whether a response should be retried.
 
   Args:
     resp_status: The response status received.
-    content: The response content body. 
+    content: The response content body.
 
   Returns:
     True if the response should be retried, otherwise False.
@@ -112,7 +108,10 @@
     # Content is in JSON format.
     try:
       data = json.loads(content.decode('utf-8'))
-      reason = data['error']['errors'][0]['reason']
+      if isinstance(data, dict):
+        reason = data['error']['errors'][0]['reason']
+      else:
+        reason = data[0]['error']['errors']['reason']
     except (UnicodeDecodeError, ValueError, KeyError):
       LOGGER.warning('Invalid JSON content from response: %s', content)
       return False
@@ -164,10 +163,14 @@
     # Retry on SSL errors and socket timeout errors.
     except _ssl_SSLError as ssl_error:
       exception = ssl_error
+    except socket.timeout as socket_timeout:
+      # It's important that this be before socket.error as it's a subclass
+      # socket.timeout has no errorcode
+      exception = socket_timeout
     except socket.error as socket_error:
       # errno's contents differ by platform, so we have to match by name.
-      if socket.errno.errorcode.get(socket_error.errno) not in (
-          'WSAETIMEDOUT', 'ETIMEDOUT', 'EPIPE', 'ECONNABORTED', ):
+      if socket.errno.errorcode.get(socket_error.errno) not in {
+        'WSAETIMEDOUT', 'ETIMEDOUT', 'EPIPE', 'ECONNABORTED'}:
         raise
       exception = socket_error
 
@@ -510,7 +513,6 @@
   Construct a MediaFileUpload and pass as the media_body parameter of the
   method. For example, if we had a service that allowed uploading images:
 
-
     media = MediaFileUpload('cow.png', mimetype='image/png',
       chunksize=1024*1024, resumable=True)
     farm.animals().insert(
@@ -654,9 +656,9 @@
             request only once.
 
     Returns:
-      (status, done): (MediaDownloadStatus, boolean)
+      (status, done): (MediaDownloadProgress, boolean)
          The value of 'done' will be True when the media has been fully
-         downloaded.
+         downloaded or the total size of the media is unknown.
 
     Raises:
       googleapiclient.errors.HttpError if the response was not a 2xx.
@@ -685,7 +687,7 @@
       elif 'content-length' in resp:
         self._total_size = int(resp['content-length'])
 
-      if self._progress == self._total_size:
+      if self._total_size is None or self._progress == self._total_size:
         self._done = True
       return MediaDownloadProgress(self._progress, self._total_size), 
self._done
     else:
@@ -767,10 +769,6 @@
     self.response_callbacks = []
     self._in_error_state = False
 
-    # Pull the multipart boundary out of the content-type header.
-    major, minor, params = mimeparse.parse_mime_type(
-        self.headers.get('content-type', 'application/json'))
-
     # The size of the non-media part of the request.
     self.body_size = len(self.body or '')
 
@@ -1089,7 +1087,17 @@
       batch_uri: string, URI to send batch requests to.
     """
     if batch_uri is None:
-      batch_uri = 'https://www.googleapis.com/batch'
+      batch_uri = _LEGACY_BATCH_URI
+
+    if batch_uri == _LEGACY_BATCH_URI:
+      LOGGER.warn(
+        "You have constructed a BatchHttpRequest using the legacy batch "
+        "endpoint %s. This endpoint will be turned down on March 25, 2019. "
+        "Please provide the API-specific endpoint or use "
+        "service.new_batch_http_request(). For more details see "
+        
"https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html";
+        "and 
https://developers.google.com/api-client-library/python/guide/batch.";,
+        _LEGACY_BATCH_URI)
     self._batch_uri = batch_uri
 
     # Global callback to be called for each individual response in the batch.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/sample_tools.py 
new/google-api-python-client-1.6.7/googleapiclient/sample_tools.py
--- old/google-api-python-client-1.6.4/googleapiclient/sample_tools.py  
2017-03-30 21:50:34.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/sample_tools.py  
2018-04-27 22:44:00.000000000 +0200
@@ -27,9 +27,13 @@
 
 from googleapiclient import discovery
 from googleapiclient.http import build_http
-from oauth2client import client
-from oauth2client import file
-from oauth2client import tools
+
+try:
+    from oauth2client import client
+    from oauth2client import file
+    from oauth2client import tools
+except ImportError:
+    raise ImportError('googleapiclient.sample_tools requires oauth2client. 
Please install oauth2client and try again.')
 
 
 def init(argv, name, version, doc, filename, scope=None, parents=[], 
discovery_filename=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-api-python-client-1.6.4/googleapiclient/schema.py 
new/google-api-python-client-1.6.7/googleapiclient/schema.py
--- old/google-api-python-client-1.6.4/googleapiclient/schema.py        
2017-03-30 21:50:34.000000000 +0200
+++ new/google-api-python-client-1.6.7/googleapiclient/schema.py        
2018-04-27 22:44:00.000000000 +0200
@@ -65,12 +65,7 @@
 
 import copy
 
-# Oauth2client < 3 has the positional helper in 'util', >= 3 has it
-# in '_helpers'.
-try:
-  from oauth2client import util
-except ImportError:
-  from oauth2client import _helpers as util
+from googleapiclient import _helpers as util
 
 
 class Schemas(object):


Reply via email to