Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-google-api-core for openSUSE:Factory checked in at 2022-09-09 18:27:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-google-api-core (Old) and /work/SRC/openSUSE:Factory/.python-google-api-core.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-api-core" Fri Sep 9 18:27:41 2022 rev:21 rq:1001930 version:2.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-google-api-core/python-google-api-core.changes 2022-06-08 14:25:33.148549324 +0200 +++ /work/SRC/openSUSE:Factory/.python-google-api-core.new.2083/python-google-api-core.changes 2022-09-09 18:29:12.617217859 +0200 @@ -1,0 +2,17 @@ +Thu Sep 8 11:26:12 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 2.10.0 + * Add 'strict' to flatten_query_params to lower-case bools (#433) + * Make grpc transcode logic work in terms of protobuf python objects (#428) + * Require python 3.7+ (#410) + * Restore support for grpcio-gcp (#418) +- from version 2.8.2 + * **deps:** allow protobuf < 5.0.0 (#400) + * drop support for grpc-gcp (#401) + * fix changelog header to consistent size (#394) + * Fix typo in the BackgroundConsumer docstring (#395) +- Refresh patches for new version + * python-google-api-core-no-mock.patch +- Update BuildRequires and Requires from setup.py + +------------------------------------------------------------------- Old: ---- google-api-core-2.8.1.tar.gz New: ---- google-api-core-2.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-google-api-core.spec ++++++ --- /var/tmp/diff_new_pack.NHeyNW/_old 2022-09-09 18:29:12.989218838 +0200 +++ /var/tmp/diff_new_pack.NHeyNW/_new 2022-09-09 18:29:12.997218859 +0200 @@ -27,7 +27,7 @@ %endif %define skip_python2 1 Name: python-google-api-core -Version: 2.8.1 +Version: 2.10.0 Release: 0 Summary: Google API client core library License: Apache-2.0 @@ -41,7 +41,7 @@ BuildRequires: %{python_module grpcio-gcp >= 0.2.2} BuildRequires: %{python_module grpcio-status >= 1.33.2} BuildRequires: %{python_module pip} -BuildRequires: %{python_module protobuf >= 3.12.0} +BuildRequires: %{python_module protobuf >= 3.20.1} BuildRequires: %{python_module pytz} BuildRequires: %{python_module requests >= 2.18.0} BuildRequires: %{python_module setuptools >= 40.3.0} @@ -60,7 +60,7 @@ Requires: python-googleapis-common-protos >= 1.53.0 Requires: python-grpcio >= 1.33.2 Requires: python-grpcio-status >= 1.33.2 -Requires: python-protobuf >= 3.12.0 +Requires: python-protobuf >= 3.20.1 Requires: python-pytz Requires: python-requests >= 2.18.0 Requires: python-setuptools >= 40.3.0 ++++++ google-api-core-2.8.1.tar.gz -> google-api-core-2.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/PKG-INFO new/google-api-core-2.10.0/PKG-INFO --- old/google-api-core-2.8.1/PKG-INFO 2022-05-26 22:34:07.961703000 +0200 +++ new/google-api-core-2.10.0/PKG-INFO 2022-09-02 03:30:01.598130500 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-api-core -Version: 2.8.1 +Version: 2.10.0 Summary: Google API client core library Home-page: https://github.com/googleapis/python-api-core Author: Google LLC @@ -12,14 +12,13 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Operating System :: OS Independent Classifier: Topic :: Internet -Requires-Python: >=3.6 +Requires-Python: >=3.7 Provides-Extra: grpc Provides-Extra: grpcgcp Provides-Extra: grpcio-gcp @@ -43,13 +42,16 @@ Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Unsupported Python Versions --------------------------- -Python == 2.7, Python == 3.5. +Python == 2.7, Python == 3.5, Python == 3.6. The last version of this library compatible with Python 2.7 and 3.5 is `google-api-core==1.31.1`. + +The last version of this library compatible with Python 3.6 is +`google-api-core==2.8.2`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/README.rst new/google-api-core-2.10.0/README.rst --- old/google-api-core-2.8.1/README.rst 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/README.rst 2022-09-02 03:27:23.000000000 +0200 @@ -16,13 +16,16 @@ Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Unsupported Python Versions --------------------------- -Python == 2.7, Python == 3.5. +Python == 2.7, Python == 3.5, Python == 3.6. The last version of this library compatible with Python 2.7 and 3.5 is `google-api-core==1.31.1`. + +The last version of this library compatible with Python 3.6 is +`google-api-core==2.8.2`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google/api_core/bidi.py new/google-api-core-2.10.0/google/api_core/bidi.py --- old/google-api-core-2.8.1/google/api_core/bidi.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/google/api_core/bidi.py 2022-09-02 03:27:23.000000000 +0200 @@ -364,7 +364,7 @@ def should_recover(exc): return ( isinstance(exc, grpc.RpcError) and - exc.code() == grpc.StatusCode.UNVAILABLE) + exc.code() == grpc.StatusCode.UNAVAILABLE) initial_request = example_pb2.StreamingRpcRequest( setting='example') @@ -589,7 +589,7 @@ def should_recover(exc): return ( isinstance(exc, grpc.RpcError) and - exc.code() == grpc.StatusCode.UNVAILABLE) + exc.code() == grpc.StatusCode.UNAVAILABLE) initial_request = example_pb2.StreamingRpcRequest( setting='example') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google/api_core/grpc_helpers.py new/google-api-core-2.10.0/google/api_core/grpc_helpers.py --- old/google-api-core-2.8.1/google/api_core/grpc_helpers.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/google/api_core/grpc_helpers.py 2022-09-02 03:27:23.000000000 +0200 @@ -16,6 +16,7 @@ import collections import functools +import warnings import grpc @@ -24,12 +25,26 @@ import google.auth.credentials import google.auth.transport.grpc import google.auth.transport.requests +import google.protobuf -try: - import grpc_gcp +PROTOBUF_VERSION = google.protobuf.__version__ - HAS_GRPC_GCP = True -except ImportError: +# The grpcio-gcp package only has support for protobuf < 4 +if PROTOBUF_VERSION[0:2] == "3.": + try: + import grpc_gcp + + warnings.warn( + """Support for grpcio-gcp is deprecated. This feature will be + removed from `google-api-core` after January 1, 2024. If you need to + continue to use this feature, please pin to a specific version of + `google-api-core`.""", + DeprecationWarning, + ) + HAS_GRPC_GCP = True + except ImportError: + HAS_GRPC_GCP = False +else: HAS_GRPC_GCP = False @@ -284,6 +299,7 @@ default_host (str): The default endpoint. e.g., "pubsub.googleapis.com". kwargs: Additional key-word args passed to :func:`grpc_gcp.secure_channel` or :func:`grpc.secure_channel`. + Note: `grpc_gcp` is only supported in environments with protobuf < 4.0.0. Returns: grpc.Channel: The created channel. @@ -303,11 +319,8 @@ ) if HAS_GRPC_GCP: - # If grpc_gcp module is available use grpc_gcp.secure_channel, - # otherwise, use grpc.secure_channel to create grpc channel. return grpc_gcp.secure_channel(target, composite_credentials, **kwargs) - else: - return grpc.secure_channel(target, composite_credentials, **kwargs) + return grpc.secure_channel(target, composite_credentials, **kwargs) _MethodCall = collections.namedtuple( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google/api_core/grpc_helpers_async.py new/google-api-core-2.10.0/google/api_core/grpc_helpers_async.py --- old/google-api-core-2.8.1/google/api_core/grpc_helpers_async.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/google/api_core/grpc_helpers_async.py 2022-09-02 03:27:23.000000000 +0200 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""AsyncIO helpers for :mod:`grpc` supporting 3.6+. +"""AsyncIO helpers for :mod:`grpc` supporting 3.7+. Please combine more detailed docstring in grpc_helpers.py to use following functions. This module is implementing the same surface with AsyncIO semantics. @@ -27,9 +27,6 @@ from google.api_core import exceptions, grpc_helpers -# TODO(lidiz) Support gRPC GCP wrapper -HAS_GRPC_GCP = False - # NOTE(lidiz) Alternatively, we can hack "__getattribute__" to perform # automatic patching for us. But that means the overhead of creating an # extra Python function spreads to every single send and receive. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google/api_core/path_template.py new/google-api-core-2.10.0/google/api_core/path_template.py --- old/google-api-core-2.8.1/google/api_core/path_template.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/google/api_core/path_template.py 2022-09-02 03:27:23.000000000 +0200 @@ -176,7 +176,7 @@ """Get the value of a field from a given dictionary. Args: - request (dict): A dictionary object. + request (dict | Message): A dictionary or a Message object. field (str): The key to the request in dot notation. Returns: @@ -184,10 +184,12 @@ """ parts = field.split(".") value = request + for part in parts: if not isinstance(value, dict): - return - value = value.get(part) + value = getattr(value, part, None) + else: + value = value.get(part) if isinstance(value, dict): return return value @@ -197,19 +199,27 @@ """Delete the value of a field from a given dictionary. Args: - request (dict): A dictionary object. + request (dict | Message): A dictionary object or a Message. field (str): The key to the request in dot notation. """ parts = deque(field.split(".")) while len(parts) > 1: - if not isinstance(request, dict): - return part = parts.popleft() - request = request.get(part) + if not isinstance(request, dict): + if hasattr(request, part): + request = getattr(request, part, None) + else: + return + else: + request = request.get(part) part = parts.popleft() if not isinstance(request, dict): - return - request.pop(part, None) + if hasattr(request, part): + request.ClearField(part) + else: + return + else: + request.pop(part, None) def validate(tmpl, path): @@ -237,7 +247,7 @@ return True if re.match(pattern, path) is not None else False -def transcode(http_options, **request_kwargs): +def transcode(http_options, message=None, **request_kwargs): """Transcodes a grpc request pattern into a proper HTTP request following the rules outlined here, https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L44-L312 @@ -248,18 +258,20 @@ 'body' (str): The body field name (optional) (This is a simplified representation of the proto option `google.api.http`) + message (Message) : A request object (optional) request_kwargs (dict) : A dict representing the request object Returns: dict: The transcoded request with these keys, 'method' (str) : The http method 'uri' (str) : The expanded uri - 'body' (dict) : A dict representing the body (optional) - 'query_params' (dict) : A dict mapping query parameter variables and values + 'body' (dict | Message) : A dict or a Message representing the body (optional) + 'query_params' (dict | Message) : A dict or Message mapping query parameter variables and values Raises: ValueError: If the request does not match the given template. """ + transcoded_value = message or request_kwargs for http_option in http_options: request = {} @@ -268,27 +280,35 @@ path_fields = [ match.group("name") for match in _VARIABLE_RE.finditer(uri_template) ] - path_args = {field: get_field(request_kwargs, field) for field in path_fields} + path_args = {field: get_field(transcoded_value, field) for field in path_fields} request["uri"] = expand(uri_template, **path_args) - # Remove fields used in uri path from request - leftovers = copy.deepcopy(request_kwargs) - for path_field in path_fields: - delete_field(leftovers, path_field) if not validate(uri_template, request["uri"]) or not all(path_args.values()): continue + # Remove fields used in uri path from request + leftovers = copy.deepcopy(transcoded_value) + for path_field in path_fields: + delete_field(leftovers, path_field) + # Assign body and query params body = http_option.get("body") if body: if body == "*": request["body"] = leftovers - request["query_params"] = {} + if message: + request["query_params"] = message.__class__() + else: + request["query_params"] = {} else: try: - request["body"] = leftovers.pop(body) - except KeyError: + if message: + request["body"] = getattr(leftovers, body) + delete_field(leftovers, body) + else: + request["body"] = leftovers.pop(body) + except (KeyError, AttributeError): continue request["query_params"] = leftovers else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google/api_core/rest_helpers.py new/google-api-core-2.10.0/google/api_core/rest_helpers.py --- old/google-api-core-2.8.1/google/api_core/rest_helpers.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/google/api_core/rest_helpers.py 2022-09-02 03:27:23.000000000 +0200 @@ -18,8 +18,8 @@ import operator -def flatten_query_params(obj): - """Flatten a nested dict into a list of (name,value) tuples. +def flatten_query_params(obj, strict=False): + """Flatten a dict into a list of (name,value) tuples. The result is suitable for setting query params on an http request. @@ -28,9 +28,10 @@ >>> obj = {'a': ... {'b': ... {'c': ['x', 'y', 'z']} }, - ... 'd': 'uvw', } - >>> flatten_query_params(obj) - [('a.b.c', 'x'), ('a.b.c', 'y'), ('a.b.c', 'z'), ('d', 'uvw')] + ... 'd': 'uvw', + ... 'e': True, } + >>> flatten_query_params(obj, strict=True) + [('a.b.c', 'x'), ('a.b.c', 'y'), ('a.b.c', 'z'), ('d', 'uvw'), ('e', 'true')] Note that, as described in https://github.com/googleapis/googleapis/blob/48d9fb8c8e287c472af500221c6450ecd45d7d39/google/api/http.proto#L117, @@ -38,7 +39,9 @@ This is enforced in this function. Args: - obj: a nested dictionary (from json), or None + obj: a possibly nested dictionary (from json), or None + strict: a bool, defaulting to False, to enforce that all values in the + result tuples be strings and, if boolean, lower-cased. Returns: a list of tuples, with each tuple having a (possibly) multi-part name and a scalar value. @@ -51,17 +54,17 @@ if obj is not None and not isinstance(obj, dict): raise TypeError("flatten_query_params must be called with dict object") - return _flatten(obj, key_path=[]) + return _flatten(obj, key_path=[], strict=strict) -def _flatten(obj, key_path): +def _flatten(obj, key_path, strict=False): if obj is None: return [] if isinstance(obj, dict): - return _flatten_dict(obj, key_path=key_path) + return _flatten_dict(obj, key_path=key_path, strict=strict) if isinstance(obj, list): - return _flatten_list(obj, key_path=key_path) - return _flatten_value(obj, key_path=key_path) + return _flatten_list(obj, key_path=key_path, strict=strict) + return _flatten_value(obj, key_path=key_path, strict=strict) def _is_primitive_value(obj): @@ -74,21 +77,33 @@ return True -def _flatten_value(obj, key_path): - return [(".".join(key_path), obj)] +def _flatten_value(obj, key_path, strict=False): + return [(".".join(key_path), _canonicalize(obj, strict=strict))] -def _flatten_dict(obj, key_path): - items = (_flatten(value, key_path=key_path + [key]) for key, value in obj.items()) +def _flatten_dict(obj, key_path, strict=False): + items = ( + _flatten(value, key_path=key_path + [key], strict=strict) + for key, value in obj.items() + ) return functools.reduce(operator.concat, items, []) -def _flatten_list(elems, key_path): +def _flatten_list(elems, key_path, strict=False): # Only lists of scalar values are supported. # The name (key_path) is repeated for each value. items = ( - _flatten_value(elem, key_path=key_path) + _flatten_value(elem, key_path=key_path, strict=strict) for elem in elems if _is_primitive_value(elem) ) return functools.reduce(operator.concat, items, []) + + +def _canonicalize(obj, strict=False): + if strict: + value = str(obj) + if isinstance(obj, bool): + value = value.lower() + return value + return obj diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google/api_core/version.py new/google-api-core-2.10.0/google/api_core/version.py --- old/google-api-core-2.8.1/google/api_core/version.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/google/api_core/version.py 2022-09-02 03:27:23.000000000 +0200 @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.8.1" +__version__ = "2.10.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google_api_core.egg-info/PKG-INFO new/google-api-core-2.10.0/google_api_core.egg-info/PKG-INFO --- old/google-api-core-2.8.1/google_api_core.egg-info/PKG-INFO 2022-05-26 22:34:07.000000000 +0200 +++ new/google-api-core-2.10.0/google_api_core.egg-info/PKG-INFO 2022-09-02 03:30:01.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-api-core -Version: 2.8.1 +Version: 2.10.0 Summary: Google API client core library Home-page: https://github.com/googleapis/python-api-core Author: Google LLC @@ -12,14 +12,13 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Operating System :: OS Independent Classifier: Topic :: Internet -Requires-Python: >=3.6 +Requires-Python: >=3.7 Provides-Extra: grpc Provides-Extra: grpcgcp Provides-Extra: grpcio-gcp @@ -43,13 +42,16 @@ Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Unsupported Python Versions --------------------------- -Python == 2.7, Python == 3.5. +Python == 2.7, Python == 3.5, Python == 3.6. The last version of this library compatible with Python 2.7 and 3.5 is `google-api-core==1.31.1`. + +The last version of this library compatible with Python 3.6 is +`google-api-core==2.8.2`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/google_api_core.egg-info/requires.txt new/google-api-core-2.10.0/google_api_core.egg-info/requires.txt --- old/google-api-core-2.8.1/google_api_core.egg-info/requires.txt 2022-05-26 22:34:07.000000000 +0200 +++ new/google-api-core-2.10.0/google_api_core.egg-info/requires.txt 2022-09-02 03:30:01.000000000 +0200 @@ -1,5 +1,5 @@ googleapis-common-protos<2.0dev,>=1.56.2 -protobuf<4.0.0dev,>=3.15.0 +protobuf<5.0.0dev,>=3.20.1 google-auth<3.0dev,>=1.25.0 requests<3.0.0dev,>=2.18.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/setup.cfg new/google-api-core-2.10.0/setup.cfg --- old/google-api-core-2.8.1/setup.cfg 2022-05-26 22:34:07.961703000 +0200 +++ new/google-api-core-2.10.0/setup.cfg 2022-09-02 03:30:01.598130500 +0200 @@ -1,5 +1,5 @@ [pytype] -python_version = 3.6 +python_version = 3.7 inputs = google/ exclude = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/setup.py new/google-api-core-2.10.0/setup.py --- old/google-api-core-2.8.1/setup.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/setup.py 2022-09-02 03:27:23.000000000 +0200 @@ -30,7 +30,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "googleapis-common-protos >= 1.56.2, < 2.0dev", - "protobuf >= 3.15.0, <4.0.0dev", + "protobuf >= 3.20.1, <5.0.0dev", "google-auth >= 1.25.0, < 3.0dev", "requests >= 2.18.0, < 3.0.0dev", ] @@ -82,7 +82,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -95,7 +94,7 @@ namespace_packages=namespaces, install_requires=dependencies, extras_require=extras, - python_requires=">=3.6", + python_requires=">=3.7", include_package_data=True, zip_safe=False, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/tests/asyncio/test_grpc_helpers_async.py new/google-api-core-2.10.0/tests/asyncio/test_grpc_helpers_async.py --- old/google-api-core-2.8.1/tests/asyncio/test_grpc_helpers_async.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/tests/asyncio/test_grpc_helpers_async.py 2022-09-02 03:27:23.000000000 +0200 @@ -565,11 +565,8 @@ grpc_secure_channel.assert_called_once_with(target, composite_creds) -@pytest.mark.skipif( - grpc_helpers_async.HAS_GRPC_GCP, reason="grpc_gcp module not available" -) @mock.patch("grpc.aio.secure_channel") -def test_create_channel_without_grpc_gcp(grpc_secure_channel): +def test_create_channel(grpc_secure_channel): target = "example.com:443" scopes = ["test_scope"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/tests/unit/test_grpc_helpers.py new/google-api-core-2.10.0/tests/unit/test_grpc_helpers.py --- old/google-api-core-2.8.1/tests/unit/test_grpc_helpers.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/tests/unit/test_grpc_helpers.py 2022-09-02 03:27:23.000000000 +0200 @@ -426,6 +426,7 @@ composite_creds_call.assert_called_once_with(ssl_creds, mock.ANY) composite_creds = composite_creds_call.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -507,6 +508,7 @@ ) assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -530,6 +532,7 @@ credentials.with_scopes.assert_called_once_with(scopes, default_scopes=None) assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -557,6 +560,7 @@ ) assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -582,6 +586,7 @@ credentials.with_quota_project.assert_called_once_with("project-foo") assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -610,6 +615,7 @@ ) assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -641,6 +647,7 @@ ) assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: @@ -672,6 +679,7 @@ ) assert channel is grpc_secure_channel.return_value + if grpc_helpers.HAS_GRPC_GCP: grpc_secure_channel.assert_called_once_with(target, composite_creds, None) else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/tests/unit/test_path_template.py new/google-api-core-2.10.0/tests/unit/test_path_template.py --- old/google-api-core-2.8.1/tests/unit/test_path_template.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/tests/unit/test_path_template.py 2022-09-02 03:27:23.000000000 +0200 @@ -17,6 +17,7 @@ import mock import pytest +from google.api import auth_pb2 from google.api_core import path_template @@ -171,113 +172,264 @@ @pytest.mark.parametrize( - "http_options, request_kwargs, expected_result", + "http_options, message, request_kwargs, expected_result", [ [ [["get", "/v1/no/template", ""]], + None, {"foo": "bar"}, ["get", "/v1/no/template", {}, {"foo": "bar"}], ], + [ + [["get", "/v1/no/template", ""]], + auth_pb2.AuthenticationRule(selector="bar"), + {}, + [ + "get", + "/v1/no/template", + None, + auth_pb2.AuthenticationRule(selector="bar"), + ], + ], # Single templates [ [["get", "/v1/{field}", ""]], + None, {"field": "parent"}, ["get", "/v1/parent", {}, {}], ], [ + [["get", "/v1/{selector}", ""]], + auth_pb2.AuthenticationRule(selector="parent"), + {}, + ["get", "/v1/parent", None, auth_pb2.AuthenticationRule()], + ], + [ [["get", "/v1/{field.sub}", ""]], + None, {"field": {"sub": "parent"}, "foo": "bar"}, ["get", "/v1/parent", {}, {"field": {}, "foo": "bar"}], ], + [ + [["get", "/v1/{oauth.canonical_scopes}", ""]], + auth_pb2.AuthenticationRule( + selector="bar", + oauth=auth_pb2.OAuthRequirements(canonical_scopes="parent"), + ), + {}, + [ + "get", + "/v1/parent", + None, + auth_pb2.AuthenticationRule( + selector="bar", oauth=auth_pb2.OAuthRequirements() + ), + ], + ], ], ) -def test_transcode_base_case(http_options, request_kwargs, expected_result): +def test_transcode_base_case(http_options, message, request_kwargs, expected_result): http_options, expected_result = helper_test_transcode(http_options, expected_result) - result = path_template.transcode(http_options, **request_kwargs) + result = path_template.transcode(http_options, message, **request_kwargs) assert result == expected_result @pytest.mark.parametrize( - "http_options, request_kwargs, expected_result", + "http_options, message, request_kwargs, expected_result", [ [ [["get", "/v1/{field.subfield}", ""]], + None, {"field": {"subfield": "parent"}, "foo": "bar"}, ["get", "/v1/parent", {}, {"field": {}, "foo": "bar"}], ], [ + [["get", "/v1/{oauth.canonical_scopes}", ""]], + auth_pb2.AuthenticationRule( + selector="bar", + oauth=auth_pb2.OAuthRequirements(canonical_scopes="parent"), + ), + {}, + [ + "get", + "/v1/parent", + None, + auth_pb2.AuthenticationRule( + selector="bar", oauth=auth_pb2.OAuthRequirements() + ), + ], + ], + [ [["get", "/v1/{field.subfield.subsubfield}", ""]], + None, {"field": {"subfield": {"subsubfield": "parent"}}, "foo": "bar"}, ["get", "/v1/parent", {}, {"field": {"subfield": {}}, "foo": "bar"}], ], [ [["get", "/v1/{field.subfield1}/{field.subfield2}", ""]], + None, {"field": {"subfield1": "parent", "subfield2": "child"}, "foo": "bar"}, ["get", "/v1/parent/child", {}, {"field": {}, "foo": "bar"}], ], + [ + [["get", "/v1/{selector}/{oauth.canonical_scopes}", ""]], + auth_pb2.AuthenticationRule( + selector="parent", + oauth=auth_pb2.OAuthRequirements(canonical_scopes="child"), + ), + {"field": {"subfield1": "parent", "subfield2": "child"}, "foo": "bar"}, + [ + "get", + "/v1/parent/child", + None, + auth_pb2.AuthenticationRule(oauth=auth_pb2.OAuthRequirements()), + ], + ], ], ) -def test_transcode_subfields(http_options, request_kwargs, expected_result): +def test_transcode_subfields(http_options, message, request_kwargs, expected_result): http_options, expected_result = helper_test_transcode(http_options, expected_result) - result = path_template.transcode(http_options, **request_kwargs) + result = path_template.transcode(http_options, message, **request_kwargs) assert result == expected_result @pytest.mark.parametrize( - "http_options, request_kwargs, expected_result", + "http_options, message, request_kwargs, expected_result", [ # Single segment wildcard [ [["get", "/v1/{field=*}", ""]], + None, {"field": "parent"}, ["get", "/v1/parent", {}, {}], ], [ + [["get", "/v1/{selector=*}", ""]], + auth_pb2.AuthenticationRule(selector="parent"), + {}, + ["get", "/v1/parent", None, auth_pb2.AuthenticationRule()], + ], + [ [["get", "/v1/{field=a/*/b/*}", ""]], + None, {"field": "a/parent/b/child", "foo": "bar"}, ["get", "/v1/a/parent/b/child", {}, {"foo": "bar"}], ], + [ + [["get", "/v1/{selector=a/*/b/*}", ""]], + auth_pb2.AuthenticationRule( + selector="a/parent/b/child", allow_without_credential=True + ), + {}, + [ + "get", + "/v1/a/parent/b/child", + None, + auth_pb2.AuthenticationRule(allow_without_credential=True), + ], + ], # Double segment wildcard [ [["get", "/v1/{field=**}", ""]], + None, {"field": "parent/p1"}, ["get", "/v1/parent/p1", {}, {}], ], [ + [["get", "/v1/{selector=**}", ""]], + auth_pb2.AuthenticationRule(selector="parent/p1"), + {}, + ["get", "/v1/parent/p1", None, auth_pb2.AuthenticationRule()], + ], + [ [["get", "/v1/{field=a/**/b/**}", ""]], + None, {"field": "a/parent/p1/b/child/c1", "foo": "bar"}, ["get", "/v1/a/parent/p1/b/child/c1", {}, {"foo": "bar"}], ], + [ + [["get", "/v1/{selector=a/**/b/**}", ""]], + auth_pb2.AuthenticationRule( + selector="a/parent/p1/b/child/c1", allow_without_credential=True + ), + {}, + [ + "get", + "/v1/a/parent/p1/b/child/c1", + None, + auth_pb2.AuthenticationRule(allow_without_credential=True), + ], + ], # Combined single and double segment wildcard [ [["get", "/v1/{field=a/*/b/**}", ""]], + None, {"field": "a/parent/b/child/c1"}, ["get", "/v1/a/parent/b/child/c1", {}, {}], ], [ + [["get", "/v1/{selector=a/*/b/**}", ""]], + auth_pb2.AuthenticationRule(selector="a/parent/b/child/c1"), + {}, + ["get", "/v1/a/parent/b/child/c1", None, auth_pb2.AuthenticationRule()], + ], + [ [["get", "/v1/{field=a/**/b/*}/v2/{name}", ""]], + None, {"field": "a/parent/p1/b/child", "name": "first", "foo": "bar"}, ["get", "/v1/a/parent/p1/b/child/v2/first", {}, {"foo": "bar"}], ], + [ + [["get", "/v1/{selector=a/**/b/*}/v2/{oauth.canonical_scopes}", ""]], + auth_pb2.AuthenticationRule( + selector="a/parent/p1/b/child", + oauth=auth_pb2.OAuthRequirements(canonical_scopes="first"), + ), + {"field": "a/parent/p1/b/child", "name": "first", "foo": "bar"}, + [ + "get", + "/v1/a/parent/p1/b/child/v2/first", + None, + auth_pb2.AuthenticationRule(oauth=auth_pb2.OAuthRequirements()), + ], + ], ], ) -def test_transcode_with_wildcard(http_options, request_kwargs, expected_result): +def test_transcode_with_wildcard( + http_options, message, request_kwargs, expected_result +): http_options, expected_result = helper_test_transcode(http_options, expected_result) - result = path_template.transcode(http_options, **request_kwargs) + result = path_template.transcode(http_options, message, **request_kwargs) assert result == expected_result @pytest.mark.parametrize( - "http_options, request_kwargs, expected_result", + "http_options, message, request_kwargs, expected_result", [ # Single field body [ [["post", "/v1/no/template", "data"]], + None, {"data": {"id": 1, "info": "some info"}, "foo": "bar"}, ["post", "/v1/no/template", {"id": 1, "info": "some info"}, {"foo": "bar"}], ], [ + [["post", "/v1/no/template", "oauth"]], + auth_pb2.AuthenticationRule( + selector="bar", + oauth=auth_pb2.OAuthRequirements(canonical_scopes="child"), + ), + {}, + [ + "post", + "/v1/no/template", + auth_pb2.OAuthRequirements(canonical_scopes="child"), + auth_pb2.AuthenticationRule(selector="bar"), + ], + ], + [ [["post", "/v1/{field=a/*}/b/{name=**}", "data"]], + None, { "field": "a/parent", "name": "first/last", @@ -291,9 +443,29 @@ {"foo": "bar"}, ], ], + [ + [["post", "/v1/{selector=a/*}/b/{oauth.canonical_scopes=**}", "oauth"]], + auth_pb2.AuthenticationRule( + selector="a/parent", + allow_without_credential=True, + requirements=[auth_pb2.AuthRequirement(provider_id="p")], + oauth=auth_pb2.OAuthRequirements(canonical_scopes="first/last"), + ), + {}, + [ + "post", + "/v1/a/parent/b/first/last", + auth_pb2.OAuthRequirements(), + auth_pb2.AuthenticationRule( + requirements=[auth_pb2.AuthRequirement(provider_id="p")], + allow_without_credential=True, + ), + ], + ], # Wildcard body [ [["post", "/v1/{field=a/*}/b/{name=**}", "*"]], + None, { "field": "a/parent", "name": "first/last", @@ -307,16 +479,38 @@ {}, ], ], + [ + [["post", "/v1/{selector=a/*}/b/{oauth.canonical_scopes=**}", "*"]], + auth_pb2.AuthenticationRule( + selector="a/parent", + allow_without_credential=True, + oauth=auth_pb2.OAuthRequirements(canonical_scopes="first/last"), + ), + { + "field": "a/parent", + "name": "first/last", + "data": {"id": 1, "info": "some info"}, + "foo": "bar", + }, + [ + "post", + "/v1/a/parent/b/first/last", + auth_pb2.AuthenticationRule( + allow_without_credential=True, oauth=auth_pb2.OAuthRequirements() + ), + auth_pb2.AuthenticationRule(), + ], + ], ], ) -def test_transcode_with_body(http_options, request_kwargs, expected_result): +def test_transcode_with_body(http_options, message, request_kwargs, expected_result): http_options, expected_result = helper_test_transcode(http_options, expected_result) - result = path_template.transcode(http_options, **request_kwargs) + result = path_template.transcode(http_options, message, **request_kwargs) assert result == expected_result @pytest.mark.parametrize( - "http_options, request_kwargs, expected_result", + "http_options, message, request_kwargs, expected_result", [ # Additional bindings [ @@ -324,6 +518,7 @@ ["post", "/v1/{field=a/*}/b/{name=**}", "extra_data"], ["post", "/v1/{field=a/*}/b/{name=**}", "*"], ], + None, { "field": "a/parent", "name": "first/last", @@ -339,36 +534,103 @@ ], [ [ + [ + "post", + "/v1/{selector=a/*}/b/{oauth.canonical_scopes=**}", + "extra_data", + ], + ["post", "/v1/{selector=a/*}/b/{oauth.canonical_scopes=**}", "*"], + ], + auth_pb2.AuthenticationRule( + selector="a/parent", + allow_without_credential=True, + oauth=auth_pb2.OAuthRequirements(canonical_scopes="first/last"), + ), + {}, + [ + "post", + "/v1/a/parent/b/first/last", + auth_pb2.AuthenticationRule( + allow_without_credential=True, oauth=auth_pb2.OAuthRequirements() + ), + auth_pb2.AuthenticationRule(), + ], + ], + [ + [ ["get", "/v1/{field=a/*}/b/{name=**}", ""], ["get", "/v1/{field=a/*}/b/first/last", ""], ], + None, {"field": "a/parent", "foo": "bar"}, ["get", "/v1/a/parent/b/first/last", {}, {"foo": "bar"}], ], + [ + [ + ["get", "/v1/{selector=a/*}/b/{oauth.allow_without_credential=**}", ""], + ["get", "/v1/{selector=a/*}/b/first/last", ""], + ], + auth_pb2.AuthenticationRule( + selector="a/parent", + allow_without_credential=True, + oauth=auth_pb2.OAuthRequirements(), + ), + {}, + [ + "get", + "/v1/a/parent/b/first/last", + None, + auth_pb2.AuthenticationRule( + allow_without_credential=True, oauth=auth_pb2.OAuthRequirements() + ), + ], + ], ], ) def test_transcode_with_additional_bindings( - http_options, request_kwargs, expected_result + http_options, message, request_kwargs, expected_result ): http_options, expected_result = helper_test_transcode(http_options, expected_result) - result = path_template.transcode(http_options, **request_kwargs) + result = path_template.transcode(http_options, message, **request_kwargs) assert result == expected_result @pytest.mark.parametrize( - "http_options, request_kwargs", + "http_options, message, request_kwargs", [ - [[["get", "/v1/{name}", ""]], {"foo": "bar"}], - [[["get", "/v1/{name}", ""]], {"name": "first/last"}], - [[["get", "/v1/{name=mr/*/*}", ""]], {"name": "first/last"}], - [[["post", "/v1/{name}", "data"]], {"name": "first/last"}], - [[["post", "/v1/{first_name}", "data"]], {"last_name": "last"}], + [[["get", "/v1/{name}", ""]], None, {"foo": "bar"}], + [[["get", "/v1/{selector}", ""]], auth_pb2.AuthenticationRule(), {}], + [[["get", "/v1/{name}", ""]], auth_pb2.AuthenticationRule(), {}], + [[["get", "/v1/{name}", ""]], None, {"name": "first/last"}], + [ + [["get", "/v1/{selector}", ""]], + auth_pb2.AuthenticationRule(selector="first/last"), + {}, + ], + [[["get", "/v1/{name=mr/*/*}", ""]], None, {"name": "first/last"}], + [ + [["get", "/v1/{selector=mr/*/*}", ""]], + auth_pb2.AuthenticationRule(selector="first/last"), + {}, + ], + [[["post", "/v1/{name}", "data"]], None, {"name": "first/last"}], + [ + [["post", "/v1/{selector}", "data"]], + auth_pb2.AuthenticationRule(selector="first"), + {}, + ], + [[["post", "/v1/{first_name}", "data"]], None, {"last_name": "last"}], + [ + [["post", "/v1/{first_name}", ""]], + auth_pb2.AuthenticationRule(selector="first"), + {}, + ], ], ) -def test_transcode_fails(http_options, request_kwargs): +def test_transcode_fails(http_options, message, request_kwargs): http_options, _ = helper_test_transcode(http_options, range(4)) with pytest.raises(ValueError): - path_template.transcode(http_options, **request_kwargs) + path_template.transcode(http_options, message, **request_kwargs) def helper_test_transcode(http_options_list, expected_result_list): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.8.1/tests/unit/test_rest_helpers.py new/google-api-core-2.10.0/tests/unit/test_rest_helpers.py --- old/google-api-core-2.8.1/tests/unit/test_rest_helpers.py 2022-05-26 22:31:07.000000000 +0200 +++ new/google-api-core-2.10.0/tests/unit/test_rest_helpers.py 2022-09-02 03:27:23.000000000 +0200 @@ -36,9 +36,26 @@ def test_flatten_simple_dict(): - assert rest_helpers.flatten_query_params({"a": "abc", "b": "def"}) == [ + obj = {"a": "abc", "b": "def", "c": True, "d": False, "e": 10, "f": -3.76} + assert rest_helpers.flatten_query_params(obj) == [ ("a", "abc"), ("b", "def"), + ("c", True), + ("d", False), + ("e", 10), + ("f", -3.76), + ] + + +def test_flatten_simple_dict_strict(): + obj = {"a": "abc", "b": "def", "c": True, "d": False, "e": 10, "f": -3.76} + assert rest_helpers.flatten_query_params(obj, strict=True) == [ + ("a", "abc"), + ("b", "def"), + ("c", "true"), + ("d", "false"), + ("e", "10"), + ("f", "-3.76"), ] ++++++ python-google-api-core-no-mock.patch ++++++ --- /var/tmp/diff_new_pack.NHeyNW/_old 2022-09-09 18:29:13.105219143 +0200 +++ /var/tmp/diff_new_pack.NHeyNW/_new 2022-09-09 18:29:13.109219154 +0200 @@ -1,6 +1,6 @@ -diff -upr google-api-core-2.7.2.orig/tests/asyncio/future/test_async_future.py google-api-core-2.7.2/tests/asyncio/future/test_async_future.py ---- google-api-core-2.7.2.orig/tests/asyncio/future/test_async_future.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/future/test_async_future.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/future/test_async_future.py google-api-core-2.10.0/tests/asyncio/future/test_async_future.py +--- google-api-core-2.10.0.orig/tests/asyncio/future/test_async_future.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/future/test_async_future.py 2022-09-08 13:25:05.452419648 +0200 @@ -14,7 +14,7 @@ import asyncio @@ -10,9 +10,9 @@ import pytest from google.api_core import exceptions -diff -upr google-api-core-2.7.2.orig/tests/asyncio/gapic/test_method_async.py google-api-core-2.7.2/tests/asyncio/gapic/test_method_async.py ---- google-api-core-2.7.2.orig/tests/asyncio/gapic/test_method_async.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/gapic/test_method_async.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/gapic/test_method_async.py google-api-core-2.10.0/tests/asyncio/gapic/test_method_async.py +--- google-api-core-2.10.0.orig/tests/asyncio/gapic/test_method_async.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/gapic/test_method_async.py 2022-09-08 13:25:05.444419568 +0200 @@ -14,7 +14,7 @@ import datetime @@ -22,9 +22,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/asyncio/operations_v1/test_operations_async_client.py google-api-core-2.7.2/tests/asyncio/operations_v1/test_operations_async_client.py ---- google-api-core-2.7.2.orig/tests/asyncio/operations_v1/test_operations_async_client.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/operations_v1/test_operations_async_client.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/operations_v1/test_operations_async_client.py google-api-core-2.10.0/tests/asyncio/operations_v1/test_operations_async_client.py +--- google-api-core-2.10.0.orig/tests/asyncio/operations_v1/test_operations_async_client.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/operations_v1/test_operations_async_client.py 2022-09-08 13:25:05.436419487 +0200 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. @@ -34,9 +34,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/asyncio/test_grpc_helpers_async.py google-api-core-2.7.2/tests/asyncio/test_grpc_helpers_async.py ---- google-api-core-2.7.2.orig/tests/asyncio/test_grpc_helpers_async.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/test_grpc_helpers_async.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/test_grpc_helpers_async.py google-api-core-2.10.0/tests/asyncio/test_grpc_helpers_async.py +--- google-api-core-2.10.0.orig/tests/asyncio/test_grpc_helpers_async.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/test_grpc_helpers_async.py 2022-09-08 13:25:05.432419447 +0200 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. @@ -46,9 +46,9 @@ import pytest # noqa: I202 try: -diff -upr google-api-core-2.7.2.orig/tests/asyncio/test_operation_async.py google-api-core-2.7.2/tests/asyncio/test_operation_async.py ---- google-api-core-2.7.2.orig/tests/asyncio/test_operation_async.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/test_operation_async.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/test_operation_async.py google-api-core-2.10.0/tests/asyncio/test_operation_async.py +--- google-api-core-2.10.0.orig/tests/asyncio/test_operation_async.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/test_operation_async.py 2022-09-08 13:25:05.448419608 +0200 @@ -13,7 +13,7 @@ # limitations under the License. @@ -58,9 +58,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/asyncio/test_page_iterator_async.py google-api-core-2.7.2/tests/asyncio/test_page_iterator_async.py ---- google-api-core-2.7.2.orig/tests/asyncio/test_page_iterator_async.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/test_page_iterator_async.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/test_page_iterator_async.py google-api-core-2.10.0/tests/asyncio/test_page_iterator_async.py +--- google-api-core-2.10.0.orig/tests/asyncio/test_page_iterator_async.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/test_page_iterator_async.py 2022-09-08 13:25:05.428419407 +0200 @@ -14,7 +14,7 @@ import inspect @@ -70,18 +70,9 @@ import pytest from google.api_core import page_iterator_async -@@ -126,7 +126,7 @@ class TestAsyncIterator: - item2 = 100 - item3 = 211 - -- # Make pages from mock responses -+ # Make pages from unittest.mock responses - parent = mock.sentinel.parent - page1 = page_iterator_async.Page( - parent, (item1, item2), page_iterator_async._item_to_value_identity -diff -upr google-api-core-2.7.2.orig/tests/asyncio/test_retry_async.py google-api-core-2.7.2/tests/asyncio/test_retry_async.py ---- google-api-core-2.7.2.orig/tests/asyncio/test_retry_async.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/asyncio/test_retry_async.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/asyncio/test_retry_async.py google-api-core-2.10.0/tests/asyncio/test_retry_async.py +--- google-api-core-2.10.0.orig/tests/asyncio/test_retry_async.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/asyncio/test_retry_async.py 2022-09-08 13:25:05.436419487 +0200 @@ -15,7 +15,7 @@ import datetime import re @@ -91,9 +82,9 @@ import pytest from google.api_core import exceptions -diff -upr google-api-core-2.7.2.orig/tests/unit/future/test__helpers.py google-api-core-2.7.2/tests/unit/future/test__helpers.py ---- google-api-core-2.7.2.orig/tests/unit/future/test__helpers.py 2022-05-12 11:14:18.390281427 +0200 -+++ google-api-core-2.7.2/tests/unit/future/test__helpers.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/future/test__helpers.py google-api-core-2.10.0/tests/unit/future/test__helpers.py +--- google-api-core-2.10.0.orig/tests/unit/future/test__helpers.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/future/test__helpers.py 2022-09-08 13:25:05.508420211 +0200 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. @@ -103,10 +94,10 @@ from google.api_core.future import _helpers -diff -upr google-api-core-2.7.2.orig/tests/unit/future/test_polling.py google-api-core-2.7.2/tests/unit/future/test_polling.py ---- google-api-core-2.7.2.orig/tests/unit/future/test_polling.py 2022-05-12 11:14:18.390281427 +0200 -+++ google-api-core-2.7.2/tests/unit/future/test_polling.py 2022-05-12 11:14:18.402281504 +0200 -@@ -16,7 +16,7 @@ import concurrent.futures +diff -Nru google-api-core-2.10.0.orig/tests/unit/future/test_polling.py google-api-core-2.10.0/tests/unit/future/test_polling.py +--- google-api-core-2.10.0.orig/tests/unit/future/test_polling.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/future/test_polling.py 2022-09-08 13:25:05.508420211 +0200 +@@ -16,7 +16,7 @@ import threading import time @@ -115,9 +106,9 @@ import pytest from google.api_core import exceptions, retry -diff -upr google-api-core-2.7.2.orig/tests/unit/gapic/test_method.py google-api-core-2.7.2/tests/unit/gapic/test_method.py ---- google-api-core-2.7.2.orig/tests/unit/gapic/test_method.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/gapic/test_method.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/gapic/test_method.py google-api-core-2.10.0/tests/unit/gapic/test_method.py +--- google-api-core-2.10.0.orig/tests/unit/gapic/test_method.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/gapic/test_method.py 2022-09-08 13:25:05.492420050 +0200 @@ -14,7 +14,7 @@ import datetime @@ -127,9 +118,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/unit/operations_v1/test_operations_rest_client.py google-api-core-2.7.2/tests/unit/operations_v1/test_operations_rest_client.py ---- google-api-core-2.7.2.orig/tests/unit/operations_v1/test_operations_rest_client.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/operations_v1/test_operations_rest_client.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/operations_v1/test_operations_rest_client.py google-api-core-2.10.0/tests/unit/operations_v1/test_operations_rest_client.py +--- google-api-core-2.10.0.orig/tests/unit/operations_v1/test_operations_rest_client.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/operations_v1/test_operations_rest_client.py 2022-09-08 13:25:05.480419930 +0200 @@ -15,7 +15,7 @@ # import os @@ -139,10 +130,10 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/unit/test_bidi.py google-api-core-2.7.2/tests/unit/test_bidi.py ---- google-api-core-2.7.2.orig/tests/unit/test_bidi.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_bidi.py 2022-05-12 11:14:18.402281504 +0200 -@@ -17,7 +17,7 @@ import logging +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_bidi.py google-api-core-2.10.0/tests/unit/test_bidi.py +--- google-api-core-2.10.0.orig/tests/unit/test_bidi.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_bidi.py 2022-09-08 13:25:05.456419688 +0200 +@@ -17,7 +17,7 @@ import queue import threading @@ -151,9 +142,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/unit/test_exceptions.py google-api-core-2.7.2/tests/unit/test_exceptions.py ---- google-api-core-2.7.2.orig/tests/unit/test_exceptions.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_exceptions.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_exceptions.py google-api-core-2.10.0/tests/unit/test_exceptions.py +--- google-api-core-2.10.0.orig/tests/unit/test_exceptions.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_exceptions.py 2022-09-08 13:25:05.488420010 +0200 @@ -15,7 +15,7 @@ import http.client import json @@ -163,10 +154,10 @@ import pytest import requests -diff -upr google-api-core-2.7.2.orig/tests/unit/test_extended_operation.py google-api-core-2.7.2/tests/unit/test_extended_operation.py ---- google-api-core-2.7.2.orig/tests/unit/test_extended_operation.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_extended_operation.py 2022-05-12 11:14:18.402281504 +0200 -@@ -16,7 +16,7 @@ import dataclasses +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_extended_operation.py google-api-core-2.10.0/tests/unit/test_extended_operation.py +--- google-api-core-2.10.0.orig/tests/unit/test_extended_operation.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_extended_operation.py 2022-09-08 13:25:05.468419809 +0200 +@@ -16,7 +16,7 @@ import enum import typing @@ -175,9 +166,9 @@ import pytest from google.api_core import exceptions -diff -upr google-api-core-2.7.2.orig/tests/unit/test_grpc_helpers.py google-api-core-2.7.2/tests/unit/test_grpc_helpers.py ---- google-api-core-2.7.2.orig/tests/unit/test_grpc_helpers.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_grpc_helpers.py 2022-05-12 11:14:18.402281504 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_grpc_helpers.py google-api-core-2.10.0/tests/unit/test_grpc_helpers.py +--- google-api-core-2.10.0.orig/tests/unit/test_grpc_helpers.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_grpc_helpers.py 2022-09-08 13:25:05.476419890 +0200 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. @@ -187,9 +178,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/unit/test_operation.py google-api-core-2.7.2/tests/unit/test_operation.py ---- google-api-core-2.7.2.orig/tests/unit/test_operation.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_operation.py 2022-05-12 11:14:18.406281529 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_operation.py google-api-core-2.10.0/tests/unit/test_operation.py +--- google-api-core-2.10.0.orig/tests/unit/test_operation.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_operation.py 2022-09-08 13:25:05.464419769 +0200 @@ -13,7 +13,7 @@ # limitations under the License. @@ -199,9 +190,9 @@ import pytest try: -diff -upr google-api-core-2.7.2.orig/tests/unit/test_page_iterator.py google-api-core-2.7.2/tests/unit/test_page_iterator.py ---- google-api-core-2.7.2.orig/tests/unit/test_page_iterator.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_page_iterator.py 2022-05-12 11:14:18.406281529 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_page_iterator.py google-api-core-2.10.0/tests/unit/test_page_iterator.py +--- google-api-core-2.10.0.orig/tests/unit/test_page_iterator.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_page_iterator.py 2022-09-08 13:25:05.460419729 +0200 @@ -15,7 +15,7 @@ import math import types @@ -211,18 +202,9 @@ import pytest from google.api_core import page_iterator -@@ -177,7 +177,7 @@ class TestIterator(object): - item2 = 100 - item3 = 211 - -- # Make pages from mock responses -+ # Make pages from unittest.mock responses - parent = mock.sentinel.parent - page1 = page_iterator.Page( - parent, (item1, item2), page_iterator._item_to_value_identity -diff -upr google-api-core-2.7.2.orig/tests/unit/test_path_template.py google-api-core-2.7.2/tests/unit/test_path_template.py ---- google-api-core-2.7.2.orig/tests/unit/test_path_template.py 2022-05-12 11:14:18.386281401 +0200 -+++ google-api-core-2.7.2/tests/unit/test_path_template.py 2022-05-12 11:14:18.406281529 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_path_template.py google-api-core-2.10.0/tests/unit/test_path_template.py +--- google-api-core-2.10.0.orig/tests/unit/test_path_template.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_path_template.py 2022-09-08 13:25:05.456419688 +0200 @@ -14,7 +14,7 @@ from __future__ import unicode_literals @@ -231,11 +213,11 @@ +from unittest import mock import pytest - from google.api_core import path_template -diff -upr google-api-core-2.7.2.orig/tests/unit/test_retry.py google-api-core-2.7.2/tests/unit/test_retry.py ---- google-api-core-2.7.2.orig/tests/unit/test_retry.py 2022-05-12 11:14:18.390281427 +0200 -+++ google-api-core-2.7.2/tests/unit/test_retry.py 2022-05-12 11:14:18.406281529 +0200 -@@ -16,7 +16,7 @@ import datetime + from google.api import auth_pb2 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_retry.py google-api-core-2.10.0/tests/unit/test_retry.py +--- google-api-core-2.10.0.orig/tests/unit/test_retry.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_retry.py 2022-09-08 13:25:05.484419970 +0200 +@@ -16,7 +16,7 @@ import itertools import re @@ -244,9 +226,9 @@ import pytest import requests.exceptions -diff -upr google-api-core-2.7.2.orig/tests/unit/test_timeout.py google-api-core-2.7.2/tests/unit/test_timeout.py ---- google-api-core-2.7.2.orig/tests/unit/test_timeout.py 2022-05-12 11:14:18.390281427 +0200 -+++ google-api-core-2.7.2/tests/unit/test_timeout.py 2022-05-12 11:14:18.406281529 +0200 +diff -Nru google-api-core-2.10.0.orig/tests/unit/test_timeout.py google-api-core-2.10.0/tests/unit/test_timeout.py +--- google-api-core-2.10.0.orig/tests/unit/test_timeout.py 2022-09-02 03:27:23.000000000 +0200 ++++ google-api-core-2.10.0/tests/unit/test_timeout.py 2022-09-08 13:25:05.500420130 +0200 @@ -15,7 +15,7 @@ import datetime import itertools