From 1b1084838565e030a7199754bc05fbbd1fccd9c9 Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Feb 03 2022 14:42:10 +0000 Subject: Update python-google-api-core to 2.4.0 Related-to: https://review.rdoproject.org/r/q/Ibfa9e22a37822fd45e4be1dd49c7acb574f43536 --- diff --git a/.python-google-api-core.metadata b/.python-google-api-core.metadata index 83d9aa2..87953a3 100644 --- a/.python-google-api-core.metadata +++ b/.python-google-api-core.metadata @@ -1 +1 @@ -cc88de7d2fddea57bffa6608f846ebbaf188a665 SOURCES/python-api-core-2.1.1.tar.gz +5ca70e3a4d04fe317486a83414f39877c1bcbd0b SOURCES/python-api-core-2.4.0.tar.gz diff --git a/SOURCES/use-unittest-mock-builtin.patch b/SOURCES/use-unittest-mock-builtin.patch index 968a0dd..13a341b 100644 --- a/SOURCES/use-unittest-mock-builtin.patch +++ b/SOURCES/use-unittest-mock-builtin.patch @@ -1,6 +1,34 @@ -diff -up ./tests/asyncio/future/test_async_future.py.orig ./tests/asyncio/future/test_async_future.py ---- ./tests/asyncio/future/test_async_future.py.orig 2021-08-23 07:02:16.988893673 -0500 -+++ ./tests/asyncio/future/test_async_future.py 2021-08-23 07:05:20.264433127 -0500 +From a569bb0e56b9f26855d6933a80efce991af2438a Mon Sep 17 00:00:00 2001 +From: Major Hayden +Date: Wed, 15 Dec 2021 13:30:32 -0600 +Subject: [PATCH] Use unittest.mock + +--- + tests/asyncio/future/test_async_future.py | 2 +- + tests/asyncio/gapic/test_method_async.py | 2 +- + tests/asyncio/operations_v1/test_operations_async_client.py | 2 +- + tests/asyncio/test_grpc_helpers_async.py | 2 +- + tests/asyncio/test_operation_async.py | 2 +- + tests/asyncio/test_page_iterator_async.py | 2 +- + tests/asyncio/test_retry_async.py | 2 +- + tests/unit/future/test__helpers.py | 2 +- + tests/unit/future/test_polling.py | 2 +- + tests/unit/gapic/test_method.py | 2 +- + tests/unit/operations_v1/test_operations_rest_client.py | 2 +- + tests/unit/test_bidi.py | 2 +- + tests/unit/test_exceptions.py | 2 +- + tests/unit/test_grpc_helpers.py | 2 +- + tests/unit/test_operation.py | 2 +- + tests/unit/test_page_iterator.py | 2 +- + tests/unit/test_path_template.py | 2 +- + tests/unit/test_retry.py | 2 +- + tests/unit/test_timeout.py | 2 +- + 19 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/tests/asyncio/future/test_async_future.py b/tests/asyncio/future/test_async_future.py +index 1e9ae33..1aaf132 100644 +--- a/tests/asyncio/future/test_async_future.py ++++ b/tests/asyncio/future/test_async_future.py @@ -14,7 +14,7 @@ import asyncio @@ -10,45 +38,49 @@ diff -up ./tests/asyncio/future/test_async_future.py.orig ./tests/asyncio/future import pytest from google.api_core import exceptions -diff -up ./tests/asyncio/gapic/test_method_async.py.orig ./tests/asyncio/gapic/test_method_async.py ---- ./tests/asyncio/gapic/test_method_async.py.orig 2021-08-23 07:02:16.988893673 -0500 -+++ ./tests/asyncio/gapic/test_method_async.py 2021-08-23 07:05:20.265433119 -0500 -@@ -15,7 +15,7 @@ +diff --git a/tests/asyncio/gapic/test_method_async.py b/tests/asyncio/gapic/test_method_async.py +index 1410747..7990e46 100644 +--- a/tests/asyncio/gapic/test_method_async.py ++++ b/tests/asyncio/gapic/test_method_async.py +@@ -14,7 +14,7 @@ + import datetime - from grpc import aio -import mock +from unittest import mock import pytest - from google.api_core import exceptions -diff -up ./tests/asyncio/operations_v1/test_operations_async_client.py.orig ./tests/asyncio/operations_v1/test_operations_async_client.py ---- ./tests/asyncio/operations_v1/test_operations_async_client.py.orig 2021-08-23 07:02:16.988893673 -0500 -+++ ./tests/asyncio/operations_v1/test_operations_async_client.py 2021-08-23 07:05:20.265433119 -0500 -@@ -13,7 +13,7 @@ + try: +diff --git a/tests/asyncio/operations_v1/test_operations_async_client.py b/tests/asyncio/operations_v1/test_operations_async_client.py +index 47c3b4b..67fc941 100644 +--- a/tests/asyncio/operations_v1/test_operations_async_client.py ++++ b/tests/asyncio/operations_v1/test_operations_async_client.py +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and # limitations under the License. - from grpc import aio -import mock +from unittest import mock import pytest - from google.api_core import grpc_helpers_async, operations_v1, page_iterator_async -diff -up ./tests/asyncio/test_grpc_helpers_async.py.orig ./tests/asyncio/test_grpc_helpers_async.py ---- ./tests/asyncio/test_grpc_helpers_async.py.orig 2021-08-23 07:02:16.988893673 -0500 -+++ ./tests/asyncio/test_grpc_helpers_async.py 2021-08-23 07:05:20.265433119 -0500 -@@ -14,7 +14,7 @@ + try: +diff --git a/tests/asyncio/test_grpc_helpers_async.py b/tests/asyncio/test_grpc_helpers_async.py +index 3681a40..cc1a5a4 100644 +--- a/tests/asyncio/test_grpc_helpers_async.py ++++ b/tests/asyncio/test_grpc_helpers_async.py +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. - import grpc - from grpc import aio -import mock +from unittest import mock - import pytest + import pytest # noqa: I202 - from google.api_core import exceptions -diff -up ./tests/asyncio/test_operation_async.py.orig ./tests/asyncio/test_operation_async.py ---- ./tests/asyncio/test_operation_async.py.orig 2021-08-23 07:02:16.988893673 -0500 -+++ ./tests/asyncio/test_operation_async.py 2021-08-23 07:05:20.266433111 -0500 + try: +diff --git a/tests/asyncio/test_operation_async.py b/tests/asyncio/test_operation_async.py +index 26ad7ce..662d956 100644 +--- a/tests/asyncio/test_operation_async.py ++++ b/tests/asyncio/test_operation_async.py @@ -13,7 +13,7 @@ # limitations under the License. @@ -57,10 +89,11 @@ diff -up ./tests/asyncio/test_operation_async.py.orig ./tests/asyncio/test_opera +from unittest import mock import pytest - from google.api_core import exceptions -diff -up ./tests/asyncio/test_page_iterator_async.py.orig ./tests/asyncio/test_page_iterator_async.py ---- ./tests/asyncio/test_page_iterator_async.py.orig 2021-08-23 07:02:16.988893673 -0500 -+++ ./tests/asyncio/test_page_iterator_async.py 2021-08-23 07:05:20.266433111 -0500 + try: +diff --git a/tests/asyncio/test_page_iterator_async.py b/tests/asyncio/test_page_iterator_async.py +index 75f9e1c..c3f5d55 100644 +--- a/tests/asyncio/test_page_iterator_async.py ++++ b/tests/asyncio/test_page_iterator_async.py @@ -14,7 +14,7 @@ import inspect @@ -70,9 +103,10 @@ diff -up ./tests/asyncio/test_page_iterator_async.py.orig ./tests/asyncio/test_p import pytest from google.api_core import page_iterator_async -diff -up ./tests/asyncio/test_retry_async.py.orig ./tests/asyncio/test_retry_async.py ---- ./tests/asyncio/test_retry_async.py.orig 2021-08-23 07:02:16.989893665 -0500 -+++ ./tests/asyncio/test_retry_async.py 2021-08-23 07:05:20.267433103 -0500 +diff --git a/tests/asyncio/test_retry_async.py b/tests/asyncio/test_retry_async.py +index 873caaf..1f57470 100644 +--- a/tests/asyncio/test_retry_async.py ++++ b/tests/asyncio/test_retry_async.py @@ -15,7 +15,7 @@ import datetime import re @@ -82,9 +116,10 @@ diff -up ./tests/asyncio/test_retry_async.py.orig ./tests/asyncio/test_retry_asy import pytest from google.api_core import exceptions -diff -up ./tests/unit/future/test__helpers.py.orig ./tests/unit/future/test__helpers.py ---- ./tests/unit/future/test__helpers.py.orig 2021-08-23 07:02:16.989893665 -0500 -+++ ./tests/unit/future/test__helpers.py 2021-08-23 07:05:20.267433103 -0500 +diff --git a/tests/unit/future/test__helpers.py b/tests/unit/future/test__helpers.py +index 98afc59..a37efdd 100644 +--- a/tests/unit/future/test__helpers.py ++++ b/tests/unit/future/test__helpers.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. @@ -94,9 +129,10 @@ diff -up ./tests/unit/future/test__helpers.py.orig ./tests/unit/future/test__hel from google.api_core.future import _helpers -diff -up ./tests/unit/future/test_polling.py.orig ./tests/unit/future/test_polling.py ---- ./tests/unit/future/test_polling.py.orig 2021-08-23 07:02:16.989893665 -0500 -+++ ./tests/unit/future/test_polling.py 2021-08-23 07:05:20.268433095 -0500 +diff --git a/tests/unit/future/test_polling.py b/tests/unit/future/test_polling.py +index 2381d03..79f19db 100644 +--- a/tests/unit/future/test_polling.py ++++ b/tests/unit/future/test_polling.py @@ -16,7 +16,7 @@ import concurrent.futures import threading import time @@ -106,69 +142,88 @@ diff -up ./tests/unit/future/test_polling.py.orig ./tests/unit/future/test_polli import pytest from google.api_core import exceptions, retry -diff -up ./tests/unit/gapic/test_method.py.orig ./tests/unit/gapic/test_method.py ---- ./tests/unit/gapic/test_method.py.orig 2021-08-23 07:02:16.989893665 -0500 -+++ ./tests/unit/gapic/test_method.py 2021-08-23 07:05:20.268433095 -0500 +diff --git a/tests/unit/gapic/test_method.py b/tests/unit/gapic/test_method.py +index 9778d23..28323da 100644 +--- a/tests/unit/gapic/test_method.py ++++ b/tests/unit/gapic/test_method.py @@ -14,7 +14,7 @@ import datetime -import mock +from unittest import mock + import pytest - from google.api_core import exceptions - from google.api_core import retry -diff -up ./tests/unit/test_bidi.py.orig ./tests/unit/test_bidi.py ---- ./tests/unit/test_bidi.py.orig 2021-08-23 07:02:16.989893665 -0500 -+++ ./tests/unit/test_bidi.py 2021-08-23 07:05:20.269433087 -0500 -@@ -18,7 +18,7 @@ import queue + try: +diff --git a/tests/unit/operations_v1/test_operations_rest_client.py b/tests/unit/operations_v1/test_operations_rest_client.py +index dddf6b7..f40d780 100644 +--- a/tests/unit/operations_v1/test_operations_rest_client.py ++++ b/tests/unit/operations_v1/test_operations_rest_client.py +@@ -15,7 +15,7 @@ + # + import os + +-import mock ++from unittest import mock + import pytest + + try: +diff --git a/tests/unit/test_bidi.py b/tests/unit/test_bidi.py +index 7fb1620..896f653 100644 +--- a/tests/unit/test_bidi.py ++++ b/tests/unit/test_bidi.py +@@ -17,7 +17,7 @@ import logging + import queue import threading - import grpc -import mock +from unittest import mock import pytest - from google.api_core import bidi -diff -up ./tests/unit/test_exceptions.py.orig ./tests/unit/test_exceptions.py ---- ./tests/unit/test_exceptions.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_exceptions.py 2021-08-23 07:05:20.269433087 -0500 -@@ -16,7 +16,7 @@ import http.client + try: +diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py +index 622f58a..4aebf7c 100644 +--- a/tests/unit/test_exceptions.py ++++ b/tests/unit/test_exceptions.py +@@ -15,7 +15,7 @@ + import http.client import json - import grpc -import mock +from unittest import mock + import pytest import requests - from google.api_core import exceptions -diff -up ./tests/unit/test_grpc_helpers.py.orig ./tests/unit/test_grpc_helpers.py ---- ./tests/unit/test_grpc_helpers.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_grpc_helpers.py 2021-08-23 07:05:20.270433079 -0500 -@@ -13,7 +13,7 @@ +diff --git a/tests/unit/test_grpc_helpers.py b/tests/unit/test_grpc_helpers.py +index ca969e4..95b1a24 100644 +--- a/tests/unit/test_grpc_helpers.py ++++ b/tests/unit/test_grpc_helpers.py +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and # limitations under the License. - import grpc -import mock +from unittest import mock import pytest - from google.api_core import exceptions -diff -up ./tests/unit/test_operation.py.orig ./tests/unit/test_operation.py ---- ./tests/unit/test_operation.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_operation.py 2021-08-23 07:05:20.270433079 -0500 + try: +diff --git a/tests/unit/test_operation.py b/tests/unit/test_operation.py +index 22e23bc..8ffee10 100644 +--- a/tests/unit/test_operation.py ++++ b/tests/unit/test_operation.py @@ -13,7 +13,7 @@ # limitations under the License. -import mock +from unittest import mock + import pytest - from google.api_core import exceptions - from google.api_core import operation -diff -up ./tests/unit/test_page_iterator.py.orig ./tests/unit/test_page_iterator.py ---- ./tests/unit/test_page_iterator.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_page_iterator.py 2021-08-23 07:05:20.271433071 -0500 + try: +diff --git a/tests/unit/test_page_iterator.py b/tests/unit/test_page_iterator.py +index a44e998..56be26f 100644 +--- a/tests/unit/test_page_iterator.py ++++ b/tests/unit/test_page_iterator.py @@ -15,7 +15,7 @@ import math import types @@ -178,9 +233,10 @@ diff -up ./tests/unit/test_page_iterator.py.orig ./tests/unit/test_page_iterator import pytest from google.api_core import page_iterator -diff -up ./tests/unit/test_path_template.py.orig ./tests/unit/test_path_template.py ---- ./tests/unit/test_path_template.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_path_template.py 2021-08-23 07:05:20.271433071 -0500 +diff --git a/tests/unit/test_path_template.py b/tests/unit/test_path_template.py +index 2c5216e..a72f25f 100644 +--- a/tests/unit/test_path_template.py ++++ b/tests/unit/test_path_template.py @@ -14,7 +14,7 @@ from __future__ import unicode_literals @@ -190,9 +246,10 @@ diff -up ./tests/unit/test_path_template.py.orig ./tests/unit/test_path_template import pytest from google.api_core import path_template -diff -up ./tests/unit/test_retry.py.orig ./tests/unit/test_retry.py ---- ./tests/unit/test_retry.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_retry.py 2021-08-23 07:05:20.272433063 -0500 +diff --git a/tests/unit/test_retry.py b/tests/unit/test_retry.py +index 74c5d77..b7462fb 100644 +--- a/tests/unit/test_retry.py ++++ b/tests/unit/test_retry.py @@ -16,7 +16,7 @@ import datetime import itertools import re @@ -202,9 +259,10 @@ diff -up ./tests/unit/test_retry.py.orig ./tests/unit/test_retry.py import pytest import requests.exceptions -diff -up ./tests/unit/test_timeout.py.orig ./tests/unit/test_timeout.py ---- ./tests/unit/test_timeout.py.orig 2021-08-23 07:02:16.990893657 -0500 -+++ ./tests/unit/test_timeout.py 2021-08-23 07:05:20.273433055 -0500 +diff --git a/tests/unit/test_timeout.py b/tests/unit/test_timeout.py +index 30d624e..c13e499 100644 +--- a/tests/unit/test_timeout.py ++++ b/tests/unit/test_timeout.py @@ -15,7 +15,7 @@ import datetime import itertools @@ -214,3 +272,6 @@ diff -up ./tests/unit/test_timeout.py.orig ./tests/unit/test_timeout.py from google.api_core import timeout +-- +2.33.1 + diff --git a/SPECS/python-google-api-core.spec b/SPECS/python-google-api-core.spec index cd5d556..43e7493 100644 --- a/SPECS/python-google-api-core.spec +++ b/SPECS/python-google-api-core.spec @@ -1,7 +1,7 @@ ## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: - release_number = 1; + release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} @@ -11,7 +11,7 @@ %global srcname google-api-core %global forgeurl https://github.com/googleapis/python-api-core -Version: 2.1.1 +Version: 2.4.0 %global tag v%{version} %forgemeta @@ -24,8 +24,9 @@ URL: %forgeurl Source0: %{url}/archive/%{tag}.tar.gz#/python-api-core-%{version}.tar.gz Patch0: use-unittest-mock-builtin.patch - BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-wheel %if %{with tests} BuildRequires: python3dist(google-auth) @@ -39,6 +40,7 @@ BuildRequires: python3dist(pytz) BuildRequires: python3dist(requests) BuildRequires: python3dist(six) %endif + BuildArch: noarch %global _description %{expand:This library is not meant to stand-alone. @@ -62,7 +64,7 @@ Requires: %{py3_dist grpcio-gcp} %pyproject_extras_subpkg -n python3-%{srcname} grpcio-gcp %prep -%forgeautosetup -p0 +%forgeautosetup -p1 %generate_buildrequires @@ -83,18 +85,60 @@ Requires: %{py3_dist grpcio-gcp} # Work around an usual pytest/PEP 420 issue where pytest can't import the # installed module. Thanks to mhroncok for the help! mv google{,_} -%pytest --disable-warnings tests/unit +%pytest --disable-warnings tests/unit \ + --ignore=tests/unit/test_rest_streaming.py \ + -k "not test_wrap_unary_errors \ + and not test_wrap_stream_errors_invocation \ + and not test_wrap_stream_errors_iterator_initialization \ + and not test_wrap_stream_errors_during_iteration \ + and not test_exception_with_error_code \ + and not Test_StreamingResponseIterator" mv google{_,} %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst CHANGELOG.md SECURITY.md -%license LICENSE %{python3_sitelib}/google_api_core-%{version}-py%{python3_version}-nspkg.pth %changelog +* Fri Jan 21 2022 Fedora Release Engineering 2.4.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jan 13 2022 Major Hayden 2.4.0-4 +- Restore other skipped tests + +* Thu Jan 13 2022 Major Hayden 2.4.0-3 +- Skip broken tests in rest streaming + +* Thu Jan 13 2022 Major Hayden 2.4.0-2 +- Run all tests + +* Wed Jan 12 2022 Major Hayden 2.4.0-1 +- Update to 2.4.0 + +* Thu Dec 16 2021 Major Hayden 2.3.2-1 +- Update to 2.3.2 + +* Wed Dec 15 2021 Major Hayden 2.3.1-1 +- Update to 2.3.1 + +* Wed Dec 08 2021 Major Hayden 2.3.0-1 +- Update to 2.3.0 + +* Wed Nov 03 2021 Major Hayden 2.2.2-1 +- Update to 2.2.2 + +* Thu Oct 28 2021 Major Hayden 2.2.1-1 +- Update to 2.2.1 + +* Tue Oct 26 2021 Major Hayden 2.2.0-1 +- Update to 2.2.0 + +* Mon Oct 25 2021 Major Hayden 2.1.1-2 +- Use python3-devel as BuildRequires + * Thu Oct 14 2021 Major Hayden 2.1.1-1 - Update to 2.1.0