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 2023-06-20 16:49:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-google-api-core (Old) and /work/SRC/openSUSE:Factory/.python-google-api-core.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-api-core" Tue Jun 20 16:49:37 2023 rev:24 rq:1093957 version:2.11.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-google-api-core/python-google-api-core.changes 2022-12-02 15:47:25.588569271 +0100 +++ /work/SRC/openSUSE:Factory/.python-google-api-core.new.15902/python-google-api-core.changes 2023-06-20 16:49:39.419829694 +0200 @@ -1,0 +2,7 @@ +Tue Jun 20 09:05:22 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 2.11.1 + * Add actionable errors for GCE long running operations (#498) + * Invalid `dev` version identifiers in `setup.py` (#505) + +------------------------------------------------------------------- Old: ---- google-api-core-2.11.0.tar.gz New: ---- google-api-core-2.11.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-google-api-core.spec ++++++ --- /var/tmp/diff_new_pack.wzAqFA/_old 2023-06-20 16:49:40.143834045 +0200 +++ /var/tmp/diff_new_pack.wzAqFA/_new 2023-06-20 16:49:40.147834068 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-google-api-core # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ %endif %define skip_python2 1 Name: python-google-api-core -Version: 2.11.0 +Version: 2.11.1 Release: 0 Summary: Google API client core library License: Apache-2.0 ++++++ google-api-core-2.11.0.tar.gz -> google-api-core-2.11.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/PKG-INFO new/google-api-core-2.11.1/PKG-INFO --- old/google-api-core-2.11.0/PKG-INFO 2022-12-01 16:31:51.545613500 +0100 +++ new/google-api-core-2.11.1/PKG-INFO 2023-06-14 20:47:04.634034400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-api-core -Version: 2.11.0 +Version: 2.11.1 Summary: Google API client core library Home-page: https://github.com/googleapis/python-api-core Author: Google LLC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/__init__.py new/google-api-core-2.11.1/google/api_core/__init__.py --- old/google-api-core-2.11.0/google/api_core/__init__.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/__init__.py 2023-06-14 20:45:04.000000000 +0200 @@ -14,7 +14,7 @@ """Google API Core. -This package contains common code and utilties used by Google client libraries. +This package contains common code and utilities used by Google client libraries. """ from google.api_core import version as api_core_version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/client_info.py new/google-api-core-2.11.1/google/api_core/client_info.py --- old/google-api-core-2.11.0/google/api_core/client_info.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/client_info.py 2023-06-14 20:45:04.000000000 +0200 @@ -48,7 +48,7 @@ ``'3.9.6'``. grpc_version (Optional[str]): The gRPC library version. api_core_version (str): The google-api-core library version. - gapic_version (Optional[str]): The sversion of gapic-generated client + gapic_version (Optional[str]): The version of gapic-generated client library, if the library was generated by gapic. client_library_version (Optional[str]): The version of the client library, generally used if the client library was not generated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/datetime_helpers.py new/google-api-core-2.11.1/google/api_core/datetime_helpers.py --- old/google-api-core-2.11.0/google/api_core/datetime_helpers.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/datetime_helpers.py 2023-06-14 20:45:04.000000000 +0200 @@ -170,7 +170,7 @@ datetime object is ignored and the datetime is treated as UTC. Returns: - str: The RFC3339 formated string representing the datetime. + str: The RFC3339 formatted string representing the datetime. """ if not ignore_zone and value.tzinfo is not None: # Convert to UTC and remove the time zone info. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/exceptions.py new/google-api-core-2.11.1/google/api_core/exceptions.py --- old/google-api-core-2.11.0/google/api_core/exceptions.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/exceptions.py 2023-06-14 20:45:04.000000000 +0200 @@ -73,7 +73,7 @@ Args: message (str): The exception message. - cause (Exception): The last exception raised when retring the + cause (Exception): The last exception raised when retrying the function. """ @@ -142,10 +142,21 @@ self._error_info = error_info def __str__(self): + error_msg = "{} {}".format(self.code, self.message) if self.details: - return "{} {} {}".format(self.code, self.message, self.details) + error_msg = "{} {}".format(error_msg, self.details) + # Note: This else condition can be removed once proposal A from + # b/284179390 is implemented. else: - return "{} {}".format(self.code, self.message) + if self.errors: + errors = [ + f"{error.code}: {error.message}" + for error in self.errors + if hasattr(error, "code") and hasattr(error, "message") + ] + if errors: + error_msg = "{} {}".format(error_msg, "\n".join(errors)) + return error_msg @property def reason(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/extended_operation.py new/google-api-core-2.11.1/google/api_core/extended_operation.py --- old/google-api-core-2.11.0/google/api_core/extended_operation.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/extended_operation.py 2023-06-14 20:45:04.000000000 +0200 @@ -101,7 +101,7 @@ # optional http_error_code = proto.Field(proto.INT32, number=3) # optional http_error_msg = proto.Field(proto.STRING, number=4) # - # the ExtendedOperation subclass would provide property overrrides that map + # the ExtendedOperation subclass would provide property overrides that map # to these (poorly named) fields. @property def name(self): @@ -158,10 +158,16 @@ return if self.error_code and self.error_message: + # Note: `errors` can be removed once proposal A from + # b/284179390 is implemented. + errors = [] + if hasattr(self, "error") and hasattr(self.error, "errors"): + errors = self.error.errors exception = exceptions.from_http_status( status_code=self.error_code, message=self.error_message, response=self._extended_operation, + errors=errors, ) self.set_exception(exception) elif self.error_code or self.error_message: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/future/polling.py new/google-api-core-2.11.1/google/api_core/future/polling.py --- old/google-api-core-2.11.0/google/api_core/future/polling.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/future/polling.py 2023-06-14 20:45:04.000000000 +0200 @@ -68,7 +68,7 @@ The :meth:`done` method should be implemented by subclasses. The polling behavior will repeatedly call ``done`` until it returns True. - The actuall polling logic is encapsulated in :meth:`result` method. See + The actual polling logic is encapsulated in :meth:`result` method. See documentation for that method for details on how polling works. .. note:: @@ -82,7 +82,7 @@ ``timeout`` argument is specified in :meth:`result` method it will override the ``polling.timeout`` property. retry (google.api_core.retry.Retry): DEPRECATED use ``polling`` instead. - If set, it will override ``polling`` paremeter for backward + If set, it will override ``polling`` parameter for backward compatibility. """ @@ -224,8 +224,8 @@ to set this parameter explicitly. If ``polling`` is provided (i.e. ``polling is not None``), it will be used - to controll the overall polling behavior and ``polling.timeout`` will - controll Polling Timeout unless it is overridden by ``timeout`` parameter + to control the overall polling behavior and ``polling.timeout`` will + control Polling Timeout unless it is overridden by ``timeout`` parameter as described above. If not provided, the``polling`` parameter specified during construction of this future (the ``polling`` argument in the constructor) will be used instead. Note: since the ``timeout`` argument may diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/gapic_v1/client_info.py new/google-api-core-2.11.1/google/api_core/gapic_v1/client_info.py --- old/google-api-core-2.11.0/google/api_core/gapic_v1/client_info.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/gapic_v1/client_info.py 2023-06-14 20:45:04.000000000 +0200 @@ -36,7 +36,7 @@ ``'3.9.6'``. grpc_version (Optional[str]): The gRPC library version. api_core_version (str): The google-api-core library version. - gapic_version (Optional[str]): The sversion of gapic-generated client + gapic_version (Optional[str]): The version of gapic-generated client library, if the library was generated by gapic. client_library_version (Optional[str]): The version of the client library, generally used if the client library was not generated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/general_helpers.py new/google-api-core-2.11.1/google/api_core/general_helpers.py --- old/google-api-core-2.11.0/google/api_core/general_helpers.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/general_helpers.py 2023-06-14 20:45:04.000000000 +0200 @@ -12,5 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This import for backward compatibiltiy only. +# This import for backward compatibility only. from functools import wraps # noqa: F401 pragma: NO COVER diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/operations_v1/abstract_operations_client.py new/google-api-core-2.11.1/google/api_core/operations_v1/abstract_operations_client.py --- old/google-api-core-2.11.0/google/api_core/operations_v1/abstract_operations_client.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/operations_v1/abstract_operations_client.py 2023-06-14 20:45:04.000000000 +0200 @@ -468,7 +468,7 @@ Returns: google.longrunning.operations_pb2.Operation: This resource represents a long- - unning operation that is the result of a + running operation that is the result of a network API call. """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/operations_v1/operations_client_config.py new/google-api-core-2.11.1/google/api_core/operations_v1/operations_client_config.py --- old/google-api-core-2.11.0/google/api_core/operations_v1/operations_client_config.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/operations_v1/operations_client_config.py 2023-06-14 20:45:04.000000000 +0200 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""gapic configuration for the googe.longrunning.operations client.""" +"""gapic configuration for the google.longrunning.operations client.""" # DEPRECATED: retry and timeout classes are instantiated directly config = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/operations_v1/transports/__init__.py new/google-api-core-2.11.1/google/api_core/operations_v1/transports/__init__.py --- old/google-api-core-2.11.0/google/api_core/operations_v1/transports/__init__.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/operations_v1/transports/__init__.py 2023-06-14 20:45:04.000000000 +0200 @@ -14,14 +14,13 @@ # limitations under the License. # from collections import OrderedDict -from typing import Dict, Type from .base import OperationsTransport from .rest import OperationsRestTransport # Compile a registry of transports. -_transport_registry = OrderedDict() # type: Dict[str, Type[OperationsTransport]] +_transport_registry = OrderedDict() _transport_registry["rest"] = OperationsRestTransport __all__ = ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/operations_v1/transports/rest.py new/google-api-core-2.11.1/google/api_core/operations_v1/transports/rest.py --- old/google-api-core-2.11.0/google/api_core/operations_v1/transports/rest.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/operations_v1/transports/rest.py 2023-06-14 20:45:04.000000000 +0200 @@ -108,7 +108,7 @@ "https", but for testing or local servers, "http" can be specified. http_options: a dictionary of http_options for transcoding, to override - the defaults from operatons.proto. Each method has an entry + the defaults from operations.proto. Each method has an entry with the corresponding http rules as value. path_prefix: path prefix (usually represents API version). Set to "v1" by default. @@ -246,7 +246,7 @@ Returns: ~.operations_pb2.Operation: This resource represents a long- - unning operation that is the result of a + running operation that is the result of a network API call. """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/protobuf_helpers.py new/google-api-core-2.11.1/google/api_core/protobuf_helpers.py --- old/google-api-core-2.11.0/google/api_core/protobuf_helpers.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/protobuf_helpers.py 2023-06-14 20:45:04.000000000 +0200 @@ -288,10 +288,10 @@ Args: original (~google.protobuf.message.Message): the original message. - If set to None, this field will be interpretted as an empty + If set to None, this field will be interpreted as an empty message. modified (~google.protobuf.message.Message): the modified message. - If set to None, this field will be interpretted as an empty + If set to None, this field will be interpreted as an empty message. Returns: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/retry.py new/google-api-core-2.11.1/google/api_core/retry.py --- old/google-api-core-2.11.0/google/api_core/retry.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/retry.py 2023-06-14 20:45:04.000000000 +0200 @@ -16,7 +16,7 @@ The :class:`Retry` decorator can be used to retry functions that raise exceptions using exponential backoff. Because a exponential sleep algorithm is -used, the retry is limited by a `deadline`. The deadline is the maxmimum amount +used, the retry is limited by a `deadline`. The deadline is the maximum amount of time a method can block. This is used instead of total number of retries because it is difficult to ascertain the amount of time a function can block when using total number of retries and exponential backoff. @@ -265,7 +265,7 @@ RPC Timeout: a value supplied by the client to the server so that the server side knows the maximum amount of time it is expected to - spend handling that specifc RPC. For example, in the case of gRPC transport, + spend handling that specific RPC. For example, in the case of gRPC transport, RPC Timeout is represented by setting "grpc-timeout" header in the HTTP2 request. The `timeout` property of this class normally never represents the RPC Timeout as it is handled separately by the ``google.api_core.timeout`` @@ -285,7 +285,7 @@ With the actual timeout types being defined above, the client libraries often refer to just Timeout without clarifying which type specifically - that is. In that case the actual timeout type (sometimes also refered to as + that is. In that case the actual timeout type (sometimes also referred to as Logical Timeout) can be determined from the context. If it is a unary rpc call (i.e. a regular one) Timeout usually stands for the RPC Timeout (if provided directly as a standalone value) or Retry Timeout (if provided as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/retry_async.py new/google-api-core-2.11.1/google/api_core/retry_async.py --- old/google-api-core-2.11.0/google/api_core/retry_async.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/retry_async.py 2023-06-14 20:45:04.000000000 +0200 @@ -169,7 +169,7 @@ if the given exception is retryable. initial (float): The minimum a,out of time to delay in seconds. This must be greater than 0. - maximum (float): The maximum amout of time to delay in seconds. + maximum (float): The maximum amount of time to delay in seconds. multiplier (float): The multiplier applied to the delay. timeout (float): How long to keep retrying in seconds. on_error (Callable[Exception]): A function to call while processing @@ -287,9 +287,9 @@ """Return a copy of this retry with the given delay options. Args: - initial (float): The minimum amout of time to delay. This must + initial (float): The minimum amount of time to delay. This must be greater than 0. - maximum (float): The maximum amout of time to delay. + maximum (float): The maximum amount of time to delay. multiplier (float): The multiplier applied to the delay. Returns: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/timeout.py new/google-api-core-2.11.1/google/api_core/timeout.py --- old/google-api-core-2.11.0/google/api_core/timeout.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/timeout.py 2023-06-14 20:45:04.000000000 +0200 @@ -220,9 +220,9 @@ deadline (Optional[float]): The overall deadline across all invocations. This is used to prevent a very large calculated timeout from pushing the overall execution time over the deadline. - This is especially useful in conjuction with + This is especially useful in conjunction with :mod:`google.api_core.retry`. If ``None``, the timeouts will not - be adjusted to accomodate an overall deadline. + be adjusted to accommodate an overall deadline. """ def __init__( @@ -238,7 +238,7 @@ self._deadline = deadline def with_deadline(self, deadline): - """Return a copy of this teimout with the given deadline. + """Return a copy of this timeout with the given deadline. Args: deadline (float): The overall deadline across all invocations. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google/api_core/version.py new/google-api-core-2.11.1/google/api_core/version.py --- old/google-api-core-2.11.0/google/api_core/version.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/google/api_core/version.py 2023-06-14 20:45:04.000000000 +0200 @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.11.0" +__version__ = "2.11.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google_api_core.egg-info/PKG-INFO new/google-api-core-2.11.1/google_api_core.egg-info/PKG-INFO --- old/google-api-core-2.11.0/google_api_core.egg-info/PKG-INFO 2022-12-01 16:31:51.000000000 +0100 +++ new/google-api-core-2.11.1/google_api_core.egg-info/PKG-INFO 2023-06-14 20:47:04.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-api-core -Version: 2.11.0 +Version: 2.11.1 Summary: Google API client core library Home-page: https://github.com/googleapis/python-api-core Author: Google LLC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/google_api_core.egg-info/requires.txt new/google-api-core-2.11.1/google_api_core.egg-info/requires.txt --- old/google-api-core-2.11.0/google_api_core.egg-info/requires.txt 2022-12-01 16:31:51.000000000 +0100 +++ new/google-api-core-2.11.1/google_api_core.egg-info/requires.txt 2023-06-14 20:47:04.000000000 +0200 @@ -1,18 +1,18 @@ -googleapis-common-protos<2.0dev,>=1.56.2 -protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5 -google-auth<3.0dev,>=2.14.1 -requests<3.0.0dev,>=2.18.0 +googleapis-common-protos<2.0.dev0,>=1.56.2 +protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0.dev0,>=3.19.5 +google-auth<3.0.dev0,>=2.14.1 +requests<3.0.0.dev0,>=2.18.0 [grpc] grpcio<2.0dev,>=1.33.2 -grpcio-status<2.0dev,>=1.33.2 +grpcio-status<2.0.dev0,>=1.33.2 [grpc:python_version >= "3.11"] grpcio<2.0dev,>=1.49.1 -grpcio-status<2.0dev,>=1.49.1 +grpcio-status<2.0.dev0,>=1.49.1 [grpcgcp] -grpcio-gcp<1.0dev,>=0.2.2 +grpcio-gcp<1.0.dev0,>=0.2.2 [grpcio-gcp] -grpcio-gcp<1.0dev,>=0.2.2 +grpcio-gcp<1.0.dev0,>=0.2.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/setup.py new/google-api-core-2.11.1/setup.py --- old/google-api-core-2.11.0/setup.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/setup.py 2023-06-14 20:45:04.000000000 +0200 @@ -29,20 +29,20 @@ # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "googleapis-common-protos >= 1.56.2, < 2.0dev", - "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - "google-auth >= 2.14.1, < 3.0dev", - "requests >= 2.18.0, < 3.0.0dev", + "googleapis-common-protos >= 1.56.2, < 2.0.dev0", + "protobuf>=3.19.5,<5.0.0.dev0,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", + "google-auth >= 2.14.1, < 3.0.dev0", + "requests >= 2.18.0, < 3.0.0.dev0", ] extras = { "grpc": [ "grpcio >= 1.33.2, < 2.0dev", "grpcio >= 1.49.1, < 2.0dev; python_version>='3.11'", - "grpcio-status >= 1.33.2, < 2.0dev", - "grpcio-status >= 1.49.1, < 2.0dev; python_version>='3.11'", + "grpcio-status >= 1.33.2, < 2.0.dev0", + "grpcio-status >= 1.49.1, < 2.0.dev0; python_version>='3.11'", ], - "grpcgcp": "grpcio-gcp >= 0.2.2, < 1.0dev", - "grpcio-gcp": "grpcio-gcp >= 0.2.2, < 1.0dev", + "grpcgcp": "grpcio-gcp >= 0.2.2, < 1.0.dev0", + "grpcio-gcp": "grpcio-gcp >= 0.2.2, < 1.0.dev0", } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/asyncio/test_grpc_helpers_async.py new/google-api-core-2.11.1/tests/asyncio/test_grpc_helpers_async.py --- old/google-api-core-2.11.0/tests/asyncio/test_grpc_helpers_async.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/asyncio/test_grpc_helpers_async.py 2023-06-14 20:45:04.000000000 +0200 @@ -280,7 +280,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.aio.secure_channel") def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_call): @@ -305,7 +305,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.aio.secure_channel") def test_create_channel_implicit_with_default_host( @@ -329,7 +329,7 @@ @mock.patch("grpc.composite_channel_credentials") @mock.patch( "google.auth.default", - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.aio.secure_channel") def test_create_channel_implicit_with_ssl_creds( @@ -351,7 +351,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.aio.secure_channel") def test_create_channel_implicit_with_scopes( @@ -372,7 +372,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.aio.secure_channel") def test_create_channel_implicit_with_default_scopes( @@ -492,7 +492,7 @@ autospec=True, return_value=(mock.sentinel.credentials, mock.sentinel.project), ) -def test_create_channnel_with_credentials_file( +def test_create_channel_with_credentials_file( load_credentials_from_file, grpc_secure_channel, composite_creds_call ): target = "example.com:443" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/unit/gapic/test_method.py new/google-api-core-2.11.1/tests/unit/gapic/test_method.py --- old/google-api-core-2.11.0/tests/unit/gapic/test_method.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/unit/gapic/test_method.py 2023-06-14 20:45:04.000000000 +0200 @@ -121,7 +121,7 @@ @mock.patch("time.sleep") -def test_wrap_method_with_default_retry_and_timeout(unusued_sleep): +def test_wrap_method_with_default_retry_and_timeout(unused_sleep): method = mock.Mock( spec=["__call__"], side_effect=[exceptions.InternalServerError(None), 42] ) @@ -139,7 +139,7 @@ @mock.patch("time.sleep") -def test_wrap_method_with_default_retry_and_timeout_using_sentinel(unusued_sleep): +def test_wrap_method_with_default_retry_and_timeout_using_sentinel(unused_sleep): method = mock.Mock( spec=["__call__"], side_effect=[exceptions.InternalServerError(None), 42] ) @@ -160,7 +160,7 @@ @mock.patch("time.sleep") -def test_wrap_method_with_overriding_retry_and_timeout(unusued_sleep): +def test_wrap_method_with_overriding_retry_and_timeout(unused_sleep): method = mock.Mock(spec=["__call__"], side_effect=[exceptions.NotFound(None), 42]) default_retry = retry.Retry() default_timeout = timeout.ConstantTimeout(60) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/unit/operations_v1/test_operations_rest_client.py new/google-api-core-2.11.1/tests/unit/operations_v1/test_operations_rest_client.py --- old/google-api-core-2.11.0/tests/unit/operations_v1/test_operations_rest_client.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/unit/operations_v1/test_operations_rest_client.py 2023-06-14 20:45:04.000000000 +0200 @@ -592,7 +592,7 @@ response_value.request = mock_request req.return_value = response_value with pytest.raises(core_exceptions.GoogleAPIError): - client.get_operation("sammple0/operations/sample1") + client.get_operation("sample0/operations/sample1") def test_delete_operation_rest( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/unit/test_client_options.py new/google-api-core-2.11.1/tests/unit/test_client_options.py --- old/google-api-core-2.11.0/tests/unit/test_client_options.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/unit/test_client_options.py 2023-06-14 20:45:04.000000000 +0200 @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from re import match import pytest from google.api_core import client_options @@ -144,10 +145,21 @@ def test_repr(): - options = client_options.ClientOptions(api_endpoint="foo.googleapis.com") - - assert ( - repr(options) - == "ClientOptions: {'api_endpoint': 'foo.googleapis.com', 'client_cert_source': None, 'client_encrypted_cert_source': None, 'api_key': None}" - or "ClientOptions: {'client_encrypted_cert_source': None, 'client_cert_source': None, 'api_endpoint': 'foo.googleapis.com', 'api_key': None}" + expected_keys = set( + [ + "api_endpoint", + "client_cert_source", + "client_encrypted_cert_source", + "quota_project_id", + "credentials_file", + "scopes", + "api_key", + "api_audience", + ] ) + options = client_options.ClientOptions(api_endpoint="foo.googleapis.com") + options_repr = repr(options) + options_keys = vars(options).keys() + assert match(r"ClientOptions:", options_repr) + assert match(r".*'api_endpoint': 'foo.googleapis.com'.*", options_repr) + assert options_keys == expected_keys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/unit/test_exceptions.py new/google-api-core-2.11.1/tests/unit/test_exceptions.py --- old/google-api-core-2.11.0/tests/unit/test_exceptions.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/unit/test_exceptions.py 2023-06-14 20:45:04.000000000 +0200 @@ -355,7 +355,7 @@ status.details.append(status_br_detail) status.details.append(status_ei_detail) - # Actualy error doesn't matter as long as its grpc.Call, + # The actual error doesn't matter as long as its grpc.Call, # because from_call is mocked. error = mock.create_autospec(grpc.Call, instance=True) with mock.patch("grpc_status.rpc_status.from_call") as m: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/unit/test_extended_operation.py new/google-api-core-2.11.1/tests/unit/test_extended_operation.py --- old/google-api-core-2.11.0/tests/unit/test_extended_operation.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/unit/test_extended_operation.py 2023-06-14 20:45:04.000000000 +0200 @@ -33,11 +33,23 @@ DONE = 1 PENDING = 2 + class LROCustomErrors: + class LROCustomError: + def __init__(self, code: str = "", message: str = ""): + self.code = code + self.message = message + + def __init__(self, errors: typing.List[LROCustomError] = []): + self.errors = errors + name: str status: StatusCode error_code: typing.Optional[int] = None error_message: typing.Optional[str] = None armor_class: typing.Optional[int] = None + # Note: `error` can be removed once proposal A from + # b/284179390 is implemented. + error: typing.Optional[LROCustomErrors] = None # Note: in generated clients, this property must be generated for each # extended operation message type. @@ -170,6 +182,35 @@ with pytest.raises(exceptions.BadRequest): ex_op.result() + # Test GCE custom LRO Error. See b/284179390 + # Note: This test case can be removed once proposal A from + # b/284179390 is implemented. + _EXCEPTION_CODE = "INCOMPATIBLE_BACKEND_SERVICES" + _EXCEPTION_MESSAGE = "Validation failed for instance group" + responses = [ + CustomOperation( + name=TEST_OPERATION_NAME, + status=CustomOperation.StatusCode.DONE, + error_code=400, + error_message="Bad request", + error=CustomOperation.LROCustomErrors( + errors=[ + CustomOperation.LROCustomErrors.LROCustomError( + code=_EXCEPTION_CODE, message=_EXCEPTION_MESSAGE + ) + ] + ), + ), + ] + + ex_op, _, _ = make_extended_operation(responses) + + # Defaults to CallError when grpc is not installed + with pytest.raises( + exceptions.BadRequest, match=f"{_EXCEPTION_CODE}: {_EXCEPTION_MESSAGE}" + ): + ex_op.result() + # Inconsistent result responses = [ CustomOperation( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-api-core-2.11.0/tests/unit/test_grpc_helpers.py new/google-api-core-2.11.1/tests/unit/test_grpc_helpers.py --- old/google-api-core-2.11.0/tests/unit/test_grpc_helpers.py 2022-12-01 16:29:15.000000000 +0100 +++ new/google-api-core-2.11.1/tests/unit/test_grpc_helpers.py 2023-06-14 20:45:04.000000000 +0200 @@ -222,7 +222,7 @@ callable_.assert_called_once_with(1, 2, three="four") -def test_wrap_stream_iterable_iterface(): +def test_wrap_stream_iterable_interface(): response_iter = mock.create_autospec(grpc.Call, instance=True) callable_ = mock.Mock(spec=["__call__"], return_value=response_iter) @@ -352,7 +352,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.secure_channel") def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_call): @@ -410,7 +410,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.secure_channel") def test_create_channel_implicit_with_ssl_creds( @@ -437,7 +437,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.secure_channel") def test_create_channel_implicit_with_scopes( @@ -462,7 +462,7 @@ @mock.patch( "google.auth.default", autospec=True, - return_value=(mock.sentinel.credentials, mock.sentinel.projet), + return_value=(mock.sentinel.credentials, mock.sentinel.project), ) @mock.patch("grpc.secure_channel") def test_create_channel_implicit_with_default_scopes(