aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLidi Zheng <lidiz@google.com>2021-08-13 09:05:01 -0700
committerGitHub <noreply@github.com>2021-08-13 12:05:01 -0400
commitbdbf889210b709d7c1945f2160bcba9161b4dd2e (patch)
treee93a7b9de59b745608add832b05f8f42570a8263
parent362ca6ce33075f7e5f5696b2116401162babf6da (diff)
downloadpython-api-core-bdbf889210b709d7c1945f2160bcba9161b4dd2e.tar.gz
fix: bump grpcio version to use stable aio API (#234)
-rw-r--r--google/api_core/grpc_helpers_async.py2
-rw-r--r--setup.py2
-rw-r--r--testing/constraints-3.6.txt2
-rw-r--r--tests/asyncio/gapic/test_method_async.py2
-rw-r--r--tests/asyncio/operations_v1/test_operations_async_client.py2
-rw-r--r--tests/asyncio/test_grpc_helpers_async.py28
6 files changed, 19 insertions, 19 deletions
diff --git a/google/api_core/grpc_helpers_async.py b/google/api_core/grpc_helpers_async.py
index 92df645..452e787 100644
--- a/google/api_core/grpc_helpers_async.py
+++ b/google/api_core/grpc_helpers_async.py
@@ -22,7 +22,7 @@ import asyncio
import functools
import grpc
-from grpc.experimental import aio
+from grpc import aio
from google.api_core import exceptions, grpc_helpers
diff --git a/setup.py b/setup.py
index d98c69c..cade3d8 100644
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@ dependencies = [
'futures >= 3.2.0; python_version < "3.2"',
]
extras = {
- "grpc": "grpcio >= 1.29.0, < 2.0dev",
+ "grpc": "grpcio >= 1.33.2, < 2.0dev",
"grpcgcp": "grpcio-gcp >= 0.2.2",
"grpcio-gcp": "grpcio-gcp >= 0.2.2",
}
diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt
index 2544e8e..744e991 100644
--- a/testing/constraints-3.6.txt
+++ b/testing/constraints-3.6.txt
@@ -11,6 +11,6 @@ google-auth==1.25.0
requests==2.18.0
setuptools==40.3.0
packaging==14.3
-grpcio==1.29.0
+grpcio==1.33.2
grpcio-gcp==0.2.2
grpcio-gcp==0.2.2
diff --git a/tests/asyncio/gapic/test_method_async.py b/tests/asyncio/gapic/test_method_async.py
index 2c6bbab..e24fe44 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.experimental import aio
+from grpc import aio
import mock
import pytest
diff --git a/tests/asyncio/operations_v1/test_operations_async_client.py b/tests/asyncio/operations_v1/test_operations_async_client.py
index 5473e8a..3fb8427 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.experimental import aio
+from grpc import aio
import mock
import pytest
diff --git a/tests/asyncio/test_grpc_helpers_async.py b/tests/asyncio/test_grpc_helpers_async.py
index a511ed4..f0b6c5f 100644
--- a/tests/asyncio/test_grpc_helpers_async.py
+++ b/tests/asyncio/test_grpc_helpers_async.py
@@ -13,7 +13,7 @@
# limitations under the License.
import grpc
-from grpc.experimental import aio
+from grpc import aio
import mock
import pytest
@@ -270,7 +270,7 @@ def test_wrap_errors_streaming(wrap_stream_errors):
autospec=True,
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_call):
target = "example.com:443"
composite_creds = composite_creds_call.return_value
@@ -295,7 +295,7 @@ def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_c
autospec=True,
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_implicit_with_default_host(
grpc_secure_channel, default, composite_creds_call, request, auth_metadata_plugin
):
@@ -319,7 +319,7 @@ def test_create_channel_implicit_with_default_host(
"google.auth.default",
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_implicit_with_ssl_creds(
grpc_secure_channel, default, composite_creds_call
):
@@ -341,7 +341,7 @@ def test_create_channel_implicit_with_ssl_creds(
autospec=True,
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_implicit_with_scopes(
grpc_secure_channel, default, composite_creds_call
):
@@ -362,7 +362,7 @@ def test_create_channel_implicit_with_scopes(
autospec=True,
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_implicit_with_default_scopes(
grpc_secure_channel, default, composite_creds_call
):
@@ -394,7 +394,7 @@ def test_create_channel_explicit_with_duplicate_credentials():
@mock.patch("grpc.composite_channel_credentials")
@mock.patch("google.auth.credentials.with_scopes_if_required", autospec=True)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_explicit(grpc_secure_channel, auth_creds, composite_creds_call):
target = "example.com:443"
composite_creds = composite_creds_call.return_value
@@ -411,7 +411,7 @@ def test_create_channel_explicit(grpc_secure_channel, auth_creds, composite_cred
@mock.patch("grpc.composite_channel_credentials")
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_explicit_scoped(grpc_secure_channel, composite_creds_call):
target = "example.com:443"
scopes = ["1", "2"]
@@ -430,7 +430,7 @@ def test_create_channel_explicit_scoped(grpc_secure_channel, composite_creds_cal
@mock.patch("grpc.composite_channel_credentials")
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_explicit_default_scopes(
grpc_secure_channel, composite_creds_call
):
@@ -453,7 +453,7 @@ def test_create_channel_explicit_default_scopes(
@mock.patch("grpc.composite_channel_credentials")
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_explicit_with_quota_project(
grpc_secure_channel, composite_creds_call
):
@@ -474,7 +474,7 @@ def test_create_channel_explicit_with_quota_project(
@mock.patch("grpc.composite_channel_credentials")
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
@mock.patch(
"google.auth.load_credentials_from_file",
autospec=True,
@@ -500,7 +500,7 @@ def test_create_channnel_with_credentials_file(
@mock.patch("grpc.composite_channel_credentials")
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
@mock.patch(
"google.auth.load_credentials_from_file",
autospec=True,
@@ -527,7 +527,7 @@ def test_create_channel_with_credentials_file_and_scopes(
@mock.patch("grpc.composite_channel_credentials")
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
@mock.patch(
"google.auth.load_credentials_from_file",
autospec=True,
@@ -556,7 +556,7 @@ def test_create_channel_with_credentials_file_and_default_scopes(
@pytest.mark.skipif(
grpc_helpers_async.HAS_GRPC_GCP, reason="grpc_gcp module not available"
)
-@mock.patch("grpc.experimental.aio.secure_channel")
+@mock.patch("grpc.aio.secure_channel")
def test_create_channel_without_grpc_gcp(grpc_secure_channel):
target = "example.com:443"
scopes = ["test_scope"]