Hello community,
here is the log from the commit of package python-google-api-python-client for
openSUSE:Factory checked in at 2019-09-27 14:46:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-api-python-client (Old)
and /work/SRC/openSUSE:Factory/.python-google-api-python-client.new.2352
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-api-python-client"
Fri Sep 27 14:46:47 2019 rev:10 rq:730379 version:1.7.11
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-google-api-python-client/python-google-api-python-client.changes
2019-03-18 10:38:49.439474632 +0100
+++
/work/SRC/openSUSE:Factory/.python-google-api-python-client.new.2352/python-google-api-python-client.changes
2019-09-27 14:46:48.893019629 +0200
@@ -1,0 +2,6 @@
+Thu Sep 12 11:34:29 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.7.11:
+ * Various small bugfixes only
+
+-------------------------------------------------------------------
Old:
----
google-api-python-client-1.7.8.tar.gz
New:
----
google-api-python-client-1.7.11.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-google-api-python-client.spec ++++++
--- /var/tmp/diff_new_pack.Coc0k1/_old 2019-09-27 14:46:49.537017954 +0200
+++ /var/tmp/diff_new_pack.Coc0k1/_new 2019-09-27 14:46:49.545017934 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-google-api-python-client
-Version: 1.7.8
+Version: 1.7.11
Release: 0
Summary: Google APIs Python Client
License: Apache-2.0
++++++ google-api-python-client-1.7.8.tar.gz ->
google-api-python-client-1.7.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/google-api-python-client-1.7.8/CHANGELOG
new/google-api-python-client-1.7.11/CHANGELOG
--- old/google-api-python-client-1.7.8/CHANGELOG 2019-01-28
23:25:02.000000000 +0100
+++ new/google-api-python-client-1.7.11/CHANGELOG 2019-08-12
19:42:07.000000000 +0200
@@ -1,3 +1,44 @@
+v1.7.11
+ Version 1.7.11
+
+ Bugfix release
+
+ Implementation Changes
+ - Pass library and Python version in x-goog-api-client header
([#734](https://github.com/googleapis/google-api-python-client/pull/734))
+
+ Documentation
+ - Fix typo in filename used in 'docs/auth.md'
([#736](https://github.com/googleapis/google-api-python-client/pull/736))
+
+
+v1.7.10
+ Version 1.7.10
+
+ Bugfix release
+
+ Implementation Changes
+ - Decode service to utf-8
([#723](https://github.com/googleapis/google-api-python-client/pull/723))
+ - Use print() function in both Python2 and Python 3
([#722](https://github.com/googleapis/google-api-python-client/pull/722))
+ - Make http.MediaFileUpload close its file descriptor
([#600](https://github.com/googleapis/google-api-python-client/pull/600))
+ - Never make 'body' required
([#718](https://github.com/googleapis/google-api-python-client/pull/718))
+
+ Documentation
+ - Add compatability check badges to README
([#691](https://github.com/googleapis/google-api-python-client/pull/691))
+ - Regenerate docs
([#696](https://github.com/googleapis/google-api-python-client/pull/696),
[#700](https://github.com/googleapis/google-api-python-client/pull/700))
+ - Create index file for dynamically generated docs
([#702](https://github.com/googleapis/google-api-python-client/pull/702))
+ - Add docs folder with guides from developers.google.com
([#706](https://github.com/googleapis/google-api-python-client/pull/706),
[#710](https://github.com/googleapis/google-api-python-client/pull/710))
+
+ Internal / Testing Changes
+ - Fix http.py, lint errors, unit test
([#724](https://github.com/googleapis/google-api-python-client/pull/724))
+ - tox.ini: Look for Python syntax errors and undefined names
([#721](https://github.com/googleapis/google-api-python-client/pull/721))
+
+
+v1.7.9
+ Version 1.7.9
+
+ Bugfix release
+ - Remove Django Samples.
([#657](https://github.com/googleapis/google-api-python-client/pull/657))
+ - Call request_orig with kwargs
([#658](https://github.com/googleapis/google-api-python-client/pull/658))
+
v1.7.8
Version 1.7.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/google-api-python-client-1.7.8/PKG-INFO
new/google-api-python-client-1.7.11/PKG-INFO
--- old/google-api-python-client-1.7.8/PKG-INFO 2019-01-28 23:25:34.000000000
+0100
+++ new/google-api-python-client-1.7.11/PKG-INFO 2019-08-12
19:42:50.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: google-api-python-client
-Version: 1.7.8
+Version: 1.7.11
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.7.8/README.md
new/google-api-python-client-1.7.11/README.md
--- old/google-api-python-client-1.7.8/README.md 2019-01-28
23:25:02.000000000 +0100
+++ new/google-api-python-client-1.7.11/README.md 2019-07-22
19:55:22.000000000 +0200
@@ -1,35 +1,45 @@
# Google API Client
[](https://badge.fury.io/py/google-api-python-client)
+[](https://python-compatibility-tools.appspot.com/one_badge_target?package=google-api-python-client)
+[](https://python-compatibility-tools.appspot.com/one_badge_target?package=git%2Bgit%3A//github.com/googleapis/google-api-python-client.git)
-This is the Python client library for Google's discovery based APIs. To get
started, please see the [full documentation for this
library](https://developers.google.com/api-client-library/python/).
Additionally, [dynamically generated
documentation](http://google.github.io/google-api-python-client/docs/epy/index.html)
is available for all of the APIs supported by this library.
+This is the Python client library for Google's discovery based APIs. To get
started, please see the [docs folder](docs/README.md).
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.
+## Documentation
+
+See the [docs folder](docs/README.md) for more detailed instructions and
additional documentation.
+
## 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
+## Installation
+
To install, simply use `pip` or `easy_install`:
```bash
-$ pip install --upgrade google-api-python-client
+pip install --upgrade google-api-python-client
```
+
or
+
```bash
-$ easy_install --upgrade google-api-python-client
+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.
+## Supported Python Versions
-# Supported Python Versions
Python 3.4, 3.5, 3.6 and 3.7 are fully supported and tested. This library may
work on later versions of 3, but we do not currently run tests against those
versions
-# Deprecated Python Versions
+## Deprecated Python Versions
+
Python == 2.7
-# Third Party Libraries and Dependencies
+## 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)
@@ -39,5 +49,6 @@
* [pycrypto](https://pypi.python.org/pypi/pycrypto)
* [pyopenssl](https://pypi.python.org/pypi/pyOpenSSL)
-# Contributing
+## 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.7.8/google_api_python_client.egg-info/PKG-INFO
new/google-api-python-client-1.7.11/google_api_python_client.egg-info/PKG-INFO
---
old/google-api-python-client-1.7.8/google_api_python_client.egg-info/PKG-INFO
2019-01-28 23:25:34.000000000 +0100
+++
new/google-api-python-client-1.7.11/google_api_python_client.egg-info/PKG-INFO
2019-08-12 19:42:50.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: google-api-python-client
-Version: 1.7.8
+Version: 1.7.11
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.7.8/googleapiclient/__init__.py
new/google-api-python-client-1.7.11/googleapiclient/__init__.py
--- old/google-api-python-client-1.7.8/googleapiclient/__init__.py
2019-01-28 23:25:02.000000000 +0100
+++ new/google-api-python-client-1.7.11/googleapiclient/__init__.py
2019-08-12 19:42:07.000000000 +0200
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "1.7.8"
+__version__ = "1.7.11"
# 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.7.8/googleapiclient/discovery.py
new/google-api-python-client-1.7.11/googleapiclient/discovery.py
--- old/google-api-python-client-1.7.8/googleapiclient/discovery.py
2019-01-28 23:25:02.000000000 +0100
+++ new/google-api-python-client-1.7.11/googleapiclient/discovery.py
2019-08-05 21:24:31.000000000 +0200
@@ -96,7 +96,6 @@
BODY_PARAMETER_DEFAULT_VALUE = {
'description': 'The request body.',
'type': 'object',
- 'required': True,
}
MEDIA_BODY_PARAMETER_DEFAULT_VALUE = {
'description': ('The filename of the media request body, or an instance '
@@ -334,6 +333,8 @@
if isinstance(service, six.string_types):
service = json.loads(service)
+ elif isinstance(service, six.binary_type):
+ service = json.loads(service.decode('utf-8'))
if 'rootUrl' not in service and (isinstance(http, (HttpMock,
HttpMockSequence))):
@@ -494,9 +495,6 @@
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
@@ -505,10 +503,8 @@
def _fix_up_media_upload(method_desc, root_desc, path_url, parameters):
"""Adds 'media_body' and 'media_mime_type' parameters if supported by method.
- SIDE EFFECTS: If the method supports media upload and has a required body,
- sets body to be optional (required=False) instead. Also, if there is a
- 'mediaUpload' in the method description, adds 'media_upload' key to
- parameters.
+ SIDE EFFECTS: If there is a 'mediaUpload' in the method description, adds
+ 'media_upload' key to parameters.
Args:
method_desc: Dictionary with metadata describing an API method. Value comes
@@ -541,8 +537,6 @@
media_path_url = _media_path_url_from_info(root_desc, path_url)
parameters['media_body'] = MEDIA_BODY_PARAMETER_DEFAULT_VALUE.copy()
parameters['media_mime_type'] =
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE.copy()
- if 'body' in parameters:
- parameters['body']['required'] = False
return accept, max_size, media_path_url
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-api-python-client-1.7.8/googleapiclient/http.py
new/google-api-python-client-1.7.11/googleapiclient/http.py
--- old/google-api-python-client-1.7.8/googleapiclient/http.py 2019-01-28
23:25:02.000000000 +0100
+++ new/google-api-python-client-1.7.11/googleapiclient/http.py 2019-08-05
21:24:31.000000000 +0200
@@ -149,6 +149,7 @@
"""
resp = None
content = None
+ exception = None
for retry_num in range(num_retries + 1):
if retry_num > 0:
# Sleep before retrying.
@@ -558,9 +559,13 @@
if mimetype is None:
# Guess failed, use octet-stream.
mimetype = 'application/octet-stream'
- super(MediaFileUpload, self).__init__(fd, mimetype, chunksize=chunksize,
+ super(MediaFileUpload, self).__init__(fd, mimetype,
+ chunksize=chunksize,
resumable=resumable)
+ def __del__(self):
+ self._fd.close()
+
def to_json(self):
"""Creating a JSON representation of an instance of MediaFileUpload.
@@ -1720,8 +1725,8 @@
headers['user-agent'] = user_agent + ' ' + headers['user-agent']
else:
headers['user-agent'] = user_agent
- resp, content = request_orig(uri, method, body, headers,
- redirections, connection_type)
+ resp, content = request_orig(uri, method=method, body=body,
headers=headers,
+ redirections=redirections,
connection_type=connection_type)
return resp, content
http.request = new_request
@@ -1761,8 +1766,8 @@
'OAuth 1.0 request made with Credentials after tunnel_patch.')
headers['x-http-method-override'] = "PATCH"
method = 'POST'
- resp, content = request_orig(uri, method, body, headers,
- redirections, connection_type)
+ resp, content = request_orig(uri, method=method, body=body,
headers=headers,
+ redirections=redirections,
connection_type=connection_type)
return resp, content
http.request = new_request
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-api-python-client-1.7.8/googleapiclient/model.py
new/google-api-python-client-1.7.11/googleapiclient/model.py
--- old/google-api-python-client-1.7.8/googleapiclient/model.py 2018-11-20
00:06:17.000000000 +0100
+++ new/google-api-python-client-1.7.11/googleapiclient/model.py
2019-08-12 19:42:00.000000000 +0200
@@ -26,12 +26,14 @@
import json
import logging
+import platform
from six.moves.urllib.parse import urlencode
from googleapiclient import __version__
from googleapiclient.errors import HttpError
+_PY_VERSION = platform.python_version()
LOGGER = logging.getLogger(__name__)
@@ -144,7 +146,12 @@
headers['user-agent'] += ' '
else:
headers['user-agent'] = ''
- headers['user-agent'] += 'google-api-python-client/%s (gzip)' % __version__
+ headers['user-agent'] += '(gzip)'
+ if 'x-goog-api-client' in headers:
+ headers['x-goog-api-client'] += ' '
+ else:
+ headers['x-goog-api-client'] = ''
+ headers['x-goog-api-client'] += 'gdcl/%s gl-python/%s' % (__version__,
_PY_VERSION)
if body_value is not None:
headers['content-type'] = self.content_type
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-api-python-client-1.7.8/tests/test_discovery.py
new/google-api-python-client-1.7.11/tests/test_discovery.py
--- old/google-api-python-client-1.7.8/tests/test_discovery.py 2018-11-30
19:30:19.000000000 +0100
+++ new/google-api-python-client-1.7.11/tests/test_discovery.py 2019-07-22
19:55:22.000000000 +0200
@@ -162,7 +162,6 @@
body = {
'description': 'The request body.',
'type': 'object',
- 'required': True,
'$ref': 'Animal',
}
self.assertEqual(parameters['body'], body)
@@ -206,7 +205,6 @@
body = {
'description': 'The request body.',
'type': 'object',
- 'required': True,
'$ref': 'Request',
'key1': 'value1',
'key2': 'value2',
@@ -219,7 +217,6 @@
method_desc = {'request': {'$ref': 'Request'}}
parameters = _fix_up_parameters(method_desc, {}, 'POST', dummy_schema)
- self.assertFalse(parameters['body']['required'])
def _base_fix_up_method_description_test(
self, method_desc, initial_parameters, final_parameters,
@@ -267,7 +264,7 @@
def test_fix_up_media_upload_with_initial_valid_minimal(self):
valid_method_desc = {'mediaUpload': {'accept': []}}
initial_parameters = {'body': {}}
- final_parameters = {'body': {'required': False},
+ final_parameters = {'body': {},
'media_body': MEDIA_BODY_PARAMETER_DEFAULT_VALUE,
'media_mime_type':
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE}
self._base_fix_up_method_description_test(
@@ -277,7 +274,7 @@
def test_fix_up_media_upload_with_initial_valid_full(self):
valid_method_desc = {'mediaUpload': {'accept': ['*/*'], 'maxSize': '10GB'}}
initial_parameters = {'body': {}}
- final_parameters = {'body': {'required': False},
+ final_parameters = {'body': {},
'media_body': MEDIA_BODY_PARAMETER_DEFAULT_VALUE,
'media_mime_type':
MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE}
ten_gb = 10 * 2**30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/google-api-python-client-1.7.8/tests/test_http.py
new/google-api-python-client-1.7.11/tests/test_http.py
--- old/google-api-python-client-1.7.8/tests/test_http.py 2019-01-26
01:21:37.000000000 +0100
+++ new/google-api-python-client-1.7.11/tests/test_http.py 2019-08-12
19:42:00.000000000 +0200
@@ -31,6 +31,7 @@
# Do not remove the httplib2 import
import json
import httplib2
+import io
import logging
import mock
import os
@@ -209,6 +210,19 @@
class TestMediaUpload(unittest.TestCase):
+ def test_media_file_upload_closes_fd_in___del__(self):
+ file_desc = mock.Mock(spec=io.TextIOWrapper)
+ opener = mock.mock_open(file_desc)
+ if PY3:
+ with mock.patch('builtins.open', return_value=opener):
+ upload = MediaFileUpload(datafile('test_close'), mimetype='text/plain')
+ else:
+ with mock.patch('__builtin__.open', return_value=opener):
+ upload = MediaFileUpload(datafile('test_close'),
mimetype='text/plain')
+ self.assertIs(upload.stream(), file_desc)
+ del upload
+ file_desc.close.assert_called_once_with()
+
def test_media_file_upload_mimetype_detection(self):
upload = MediaFileUpload(datafile('small.png'))
self.assertEqual('image/png', upload.mimetype())
@@ -471,26 +485,22 @@
download = MediaIoBaseDownload(
fd=self.fd, request=self.request, chunksize=3)
- self.assertEqual(download._headers, {'Cache-Control':'no-store'})
+ self.assertEqual(download._headers.get('Cache-Control'), 'no-store')
status, done = download.next_chunk()
- result = self.fd.getvalue().decode('utf-8')
+ result = json.loads(self.fd.getvalue().decode('utf-8'))
- # we abuse the internals of the object we're testing, pay no attention
- # to the actual bytes= values here; we are just asserting that the
- # header we added to the original request is sent up to the server
- # on each call to next_chunk
+ # assert that that the header we added to the original request is
+ # sent up to the server on each call to next_chunk
- self.assertEqual(json.loads(result),
- {"Cache-Control": "no-store", "range": "bytes=0-3"})
+ self.assertEqual(result.get("Cache-Control"), "no-store")
download._fd = self.fd = BytesIO()
status, done = download.next_chunk()
- result = self.fd.getvalue().decode('utf-8')
- self.assertEqual(json.loads(result),
- {"Cache-Control": "no-store", "range": "bytes=51-54"})
+ result = json.loads(self.fd.getvalue().decode('utf-8'))
+ self.assertEqual(result.get("Cache-Control"), "no-store")
def test_media_io_base_download_handle_redirects(self):
self.request.http = HttpMockSequence([
@@ -861,7 +871,7 @@
headers={'content-type': ''})
request.execute()
self.assertEqual('', http.headers.get('content-type'))
-
+
def test_no_retry_connection_errors(self):
model = JsonModel()
request = HttpRequest(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-api-python-client-1.7.8/tests/test_json_model.py
new/google-api-python-client-1.7.11/tests/test_json_model.py
--- old/google-api-python-client-1.7.8/tests/test_json_model.py 2018-11-20
00:06:17.000000000 +0100
+++ new/google-api-python-client-1.7.11/tests/test_json_model.py
2019-08-12 19:42:00.000000000 +0200
@@ -26,6 +26,7 @@
import copy
import json
import os
+import platform
import unittest2 as unittest
import httplib2
import googleapiclient.model
@@ -143,8 +144,22 @@
headers, path_params, query_params, body)
self.assertEqual(headers['user-agent'],
- 'my-test-app/1.23.4 google-api-python-client/' + __version__ +
- ' (gzip)')
+ 'my-test-app/1.23.4 (gzip)')
+
+ def test_x_goog_api_client(self):
+ model = JsonModel(data_wrapper=False)
+
+ # test header composition for cloud clients that wrap discovery
+ headers = {'x-goog-api-client': 'gccl/1.23.4'}
+ path_params = {}
+ query_params = {}
+ body = {}
+
+ headers, unused_params, unused_query, body = model.request(
+ headers, path_params, query_params, body)
+
+ self.assertEqual(headers['x-goog-api-client'],
+ 'gccl/1.23.4' + ' gdcl/' + __version__ + ' gl-python/' +
platform.python_version())
def test_bad_response(self):
model = JsonModel(data_wrapper=False)