You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/20 23:15:47 UTC

[GitHub] [beam] aaltay commented on a change in pull request #11187: optionally import grpc

aaltay commented on a change in pull request #11187: optionally import grpc
URL: https://github.com/apache/beam/pull/11187#discussion_r395928394
 
 

 ##########
 File path: sdks/python/apache_beam/runners/direct/test_stream_impl.py
 ##########
 @@ -29,13 +29,20 @@
 
 import itertools
 
-import grpc
+try:
+  import grpc
+  from apache_beam.portability.api import beam_runner_api_pb2_grpc
+except:
+  grpc = None
+  beam_runner_api_pb2_grpc = None
+  # A workaround for some internal tests which are missing grpc dependencyy.
 
 Review comment:
   maybe change "for some internal tests" to "directrunner users who would cannot depend on grpc"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services