From aca633f7050087b0618fec97972809604172d2b1 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 11 Mar 2022 01:52:34 +0000 Subject: [PATCH 1/5] chore(deps): allow google-api-core v2 on v2 release --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 87f3e26874..329637c2bd 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.22.0, < 2.0.0dev", + "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "google-cloud-core >= 1.4.1, < 2.0dev", "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", "libcst >= 0.2.5", From 23afe0b5f2e8629df5716e85be11518611dc024a Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Thu, 10 Mar 2022 18:53:46 -0700 Subject: [PATCH 2/5] chore: allow google-cloud-core < 3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 329637c2bd..c20a714925 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "google-cloud-core >= 1.4.1, < 2.0dev", + "google-cloud-core >= 1.4.1, < 3.0dev", "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", "libcst >= 0.2.5", "proto-plus == 1.11.0", From 2bcf5716f906e19a4593398f833dec87b2f6fc8d Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Sun, 13 Mar 2022 19:57:28 +0000 Subject: [PATCH 3/5] ci: add test dependency pytz --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 1a6227824a..24f752b439 100644 --- a/noxfile.py +++ b/noxfile.py @@ -72,7 +72,7 @@ def default(session): # Install all test dependencies, then install this package in-place. session.install("asyncmock", "pytest-asyncio") - session.install("mock", "pytest", "pytest-cov") + session.install("mock", "pytest", "pytest-cov", "pytz") session.install("-e", ".") # Run py.test against the unit tests. @@ -143,7 +143,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install( - "mock", "pytest", "google-cloud-testutils", + "mock", "pytest", "google-cloud-testutils", "pytz", ) session.install("-e", ".[tracing]") From 798e200a2de04200429cca109832b58466b0f49f Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Sun, 13 Mar 2022 19:58:51 +0000 Subject: [PATCH 4/5] ci: fix tests --- tests/unit/test_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index a3001e61ae..dd8d8eb73d 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -87,7 +87,7 @@ def _constructor_test_helper( self.assertIs(client._credentials, expected_creds) if expected_scopes is not None: - creds.with_scopes.assert_called_once_with(expected_scopes) + creds.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None) self.assertEqual(client.project, self.PROJECT) self.assertIs(client._client_info, expected_client_info) @@ -234,7 +234,7 @@ def test_instance_admin_api(self, mock_em): credentials=mock.ANY, client_info=client_info, client_options=client_options ) - credentials.with_scopes.assert_called_once_with(expected_scopes) + credentials.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None) @mock.patch("google.cloud.spanner_v1.client._get_spanner_emulator_host") def test_instance_admin_api_emulator_env(self, mock_em): @@ -332,7 +332,7 @@ def test_database_admin_api(self, mock_em): credentials=mock.ANY, client_info=client_info, client_options=client_options ) - credentials.with_scopes.assert_called_once_with(expected_scopes) + credentials.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None) @mock.patch("google.cloud.spanner_v1.client._get_spanner_emulator_host") def test_database_admin_api_emulator_env(self, mock_em): From bfda2dcdf8048294cdffe0b10c457fbaebf5a2ce Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Sun, 13 Mar 2022 22:44:12 +0000 Subject: [PATCH 5/5] chore: lint --- tests/unit/test_client.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index dd8d8eb73d..65db43f623 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -87,7 +87,9 @@ def _constructor_test_helper( self.assertIs(client._credentials, expected_creds) if expected_scopes is not None: - creds.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None) + creds.with_scopes.assert_called_once_with( + expected_scopes, default_scopes=None + ) self.assertEqual(client.project, self.PROJECT) self.assertIs(client._client_info, expected_client_info) @@ -234,7 +236,9 @@ def test_instance_admin_api(self, mock_em): credentials=mock.ANY, client_info=client_info, client_options=client_options ) - credentials.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None) + credentials.with_scopes.assert_called_once_with( + expected_scopes, default_scopes=None + ) @mock.patch("google.cloud.spanner_v1.client._get_spanner_emulator_host") def test_instance_admin_api_emulator_env(self, mock_em): @@ -332,7 +336,9 @@ def test_database_admin_api(self, mock_em): credentials=mock.ANY, client_info=client_info, client_options=client_options ) - credentials.with_scopes.assert_called_once_with(expected_scopes, default_scopes=None) + credentials.with_scopes.assert_called_once_with( + expected_scopes, default_scopes=None + ) @mock.patch("google.cloud.spanner_v1.client._get_spanner_emulator_host") def test_database_admin_api_emulator_env(self, mock_em):