Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ea29e22

Browse filesBrowse files
committed
fix: Use stable gRPC AsyncIO API
1 parent a12c051 commit ea29e22
Copy full SHA for ea29e22

File tree

Expand file treeCollapse file tree

4 files changed

+17
-17
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+17
-17
lines changed

‎google/api_core/grpc_helpers_async.py

Copy file name to clipboardExpand all lines: google/api_core/grpc_helpers_async.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import functools
2323

2424
import grpc
25-
from grpc.experimental import aio
25+
from grpc import aio
2626

2727
from google.api_core import exceptions, grpc_helpers
2828

‎tests/asyncio/gapic/test_method_async.py

Copy file name to clipboardExpand all lines: tests/asyncio/gapic/test_method_async.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import datetime
1616

17-
from grpc.experimental import aio
17+
from grpc import aio
1818
import mock
1919
import pytest
2020

‎tests/asyncio/operations_v1/test_operations_async_client.py

Copy file name to clipboardExpand all lines: tests/asyncio/operations_v1/test_operations_async_client.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from grpc.experimental import aio
15+
from grpc import aio
1616
import mock
1717
import pytest
1818

‎tests/asyncio/test_grpc_helpers_async.py

Copy file name to clipboardExpand all lines: tests/asyncio/test_grpc_helpers_async.py
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
import grpc
16-
from grpc.experimental import aio
16+
from grpc import aio
1717
import mock
1818
import pytest
1919

@@ -270,7 +270,7 @@ def test_wrap_errors_streaming(wrap_stream_errors):
270270
autospec=True,
271271
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
272272
)
273-
@mock.patch("grpc.experimental.aio.secure_channel")
273+
@mock.patch("grpc.aio.secure_channel")
274274
def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_call):
275275
target = "example.com:443"
276276
composite_creds = composite_creds_call.return_value
@@ -295,7 +295,7 @@ def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_c
295295
autospec=True,
296296
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
297297
)
298-
@mock.patch("grpc.experimental.aio.secure_channel")
298+
@mock.patch("grpc.aio.secure_channel")
299299
def test_create_channel_implicit_with_default_host(
300300
grpc_secure_channel, default, composite_creds_call, request, auth_metadata_plugin
301301
):
@@ -319,7 +319,7 @@ def test_create_channel_implicit_with_default_host(
319319
"google.auth.default",
320320
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
321321
)
322-
@mock.patch("grpc.experimental.aio.secure_channel")
322+
@mock.patch("grpc.aio.secure_channel")
323323
def test_create_channel_implicit_with_ssl_creds(
324324
grpc_secure_channel, default, composite_creds_call
325325
):
@@ -341,7 +341,7 @@ def test_create_channel_implicit_with_ssl_creds(
341341
autospec=True,
342342
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
343343
)
344-
@mock.patch("grpc.experimental.aio.secure_channel")
344+
@mock.patch("grpc.aio.secure_channel")
345345
def test_create_channel_implicit_with_scopes(
346346
grpc_secure_channel, default, composite_creds_call
347347
):
@@ -362,7 +362,7 @@ def test_create_channel_implicit_with_scopes(
362362
autospec=True,
363363
return_value=(mock.sentinel.credentials, mock.sentinel.projet),
364364
)
365-
@mock.patch("grpc.experimental.aio.secure_channel")
365+
@mock.patch("grpc.aio.secure_channel")
366366
def test_create_channel_implicit_with_default_scopes(
367367
grpc_secure_channel, default, composite_creds_call
368368
):
@@ -394,7 +394,7 @@ def test_create_channel_explicit_with_duplicate_credentials():
394394

395395
@mock.patch("grpc.composite_channel_credentials")
396396
@mock.patch("google.auth.credentials.with_scopes_if_required", autospec=True)
397-
@mock.patch("grpc.experimental.aio.secure_channel")
397+
@mock.patch("grpc.aio.secure_channel")
398398
def test_create_channel_explicit(grpc_secure_channel, auth_creds, composite_creds_call):
399399
target = "example.com:443"
400400
composite_creds = composite_creds_call.return_value
@@ -411,7 +411,7 @@ def test_create_channel_explicit(grpc_secure_channel, auth_creds, composite_cred
411411

412412

413413
@mock.patch("grpc.composite_channel_credentials")
414-
@mock.patch("grpc.experimental.aio.secure_channel")
414+
@mock.patch("grpc.aio.secure_channel")
415415
def test_create_channel_explicit_scoped(grpc_secure_channel, composite_creds_call):
416416
target = "example.com:443"
417417
scopes = ["1", "2"]
@@ -430,7 +430,7 @@ def test_create_channel_explicit_scoped(grpc_secure_channel, composite_creds_cal
430430

431431

432432
@mock.patch("grpc.composite_channel_credentials")
433-
@mock.patch("grpc.experimental.aio.secure_channel")
433+
@mock.patch("grpc.aio.secure_channel")
434434
def test_create_channel_explicit_default_scopes(
435435
grpc_secure_channel, composite_creds_call
436436
):
@@ -453,7 +453,7 @@ def test_create_channel_explicit_default_scopes(
453453

454454

455455
@mock.patch("grpc.composite_channel_credentials")
456-
@mock.patch("grpc.experimental.aio.secure_channel")
456+
@mock.patch("grpc.aio.secure_channel")
457457
def test_create_channel_explicit_with_quota_project(
458458
grpc_secure_channel, composite_creds_call
459459
):
@@ -474,7 +474,7 @@ def test_create_channel_explicit_with_quota_project(
474474

475475

476476
@mock.patch("grpc.composite_channel_credentials")
477-
@mock.patch("grpc.experimental.aio.secure_channel")
477+
@mock.patch("grpc.aio.secure_channel")
478478
@mock.patch(
479479
"google.auth.load_credentials_from_file",
480480
autospec=True,
@@ -500,7 +500,7 @@ def test_create_channnel_with_credentials_file(
500500

501501

502502
@mock.patch("grpc.composite_channel_credentials")
503-
@mock.patch("grpc.experimental.aio.secure_channel")
503+
@mock.patch("grpc.aio.secure_channel")
504504
@mock.patch(
505505
"google.auth.load_credentials_from_file",
506506
autospec=True,
@@ -527,7 +527,7 @@ def test_create_channel_with_credentials_file_and_scopes(
527527

528528

529529
@mock.patch("grpc.composite_channel_credentials")
530-
@mock.patch("grpc.experimental.aio.secure_channel")
530+
@mock.patch("grpc.aio.secure_channel")
531531
@mock.patch(
532532
"google.auth.load_credentials_from_file",
533533
autospec=True,
@@ -556,7 +556,7 @@ def test_create_channel_with_credentials_file_and_default_scopes(
556556
@pytest.mark.skipif(
557557
grpc_helpers_async.HAS_GRPC_GCP, reason="grpc_gcp module not available"
558558
)
559-
@mock.patch("grpc.experimental.aio.secure_channel")
559+
@mock.patch("grpc.aio.secure_channel")
560560
def test_create_channel_without_grpc_gcp(grpc_secure_channel):
561561
target = "example.com:443"
562562
scopes = ["test_scope"]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.