Skip to content

Commit 1a7578d

Browse files
committed
use warnings.warn instead of _LOGGER.debug
1 parent 60b8acb commit 1a7578d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

google/api_core/grpc_helpers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import collections
1919
import functools
20-
import logging
2120
import warnings
2221

2322
import grpc
@@ -53,8 +52,6 @@
5352
# The list of gRPC Callable interfaces that return iterators.
5453
_STREAM_WRAP_CLASSES = (grpc.UnaryStreamMultiCallable, grpc.StreamStreamMultiCallable)
5554

56-
_LOGGER = logging.getLogger(__name__)
57-
5855
# denotes the proto response type for grpc calls
5956
P = TypeVar("P")
6057

@@ -373,8 +370,9 @@ def create_channel(
373370
# Note that grpcio-gcp is deprecated
374371
if HAS_GRPC_GCP: # pragma: NO COVER
375372
if compression is not None and compression != grpc.Compression.NoCompression:
376-
_LOGGER.debug(
377-
"Compression argument is being ignored for grpc_gcp.secure_channel creation."
373+
warnings.warn(
374+
"The `compression` argument is ignored for grpc_gcp.secure_channel creation.",
375+
DeprecationWarning,
378376
)
379377
if attempt_direct_path:
380378
warnings.warn(

0 commit comments

Comments
 (0)