googleapis/gax-python

Recent addition breaks library on Google App Engine.

Opened this issue · 4 comments

The recent addition of a use of multiprocessing has broken this on Google App Engine (as it doesn't support mp).

https://github.com/googleapis/gax-python/blame/4e15ca6412b54950c20705a72cda54ee27ba9436/google/gax/__init__.py#L35

Upon execution (truncated):

     [exec]   File "/path-to-packages/google/gax/__init__.py", line 35, in <module>
     [exec]     import multiprocessing as mp
     [exec]   File "/usr/lib/python2.7/multiprocessing/__init__.py", line 65, in <module>
     [exec]     from multiprocessing.util import SUBDEBUG, SUBWARNING
     [exec]   File "/usr/lib/python2.7/multiprocessing/util.py", line 41, in <module>
     [exec]     from subprocess import _args_from_interpreter_flags
     [exec] ImportError: cannot import name _args_from_interpreter_flag

Obviously this is quite the inconvenience for GCP customers who want to use the GAX backend for Google's APIs.

A gist about how to address this problem (kind of hack): https://gist.github.com/nilleb/419122f2f6f1228650dd2dccbd01c5af

@jstephenson we're looking into this. As a heads up, even if you get gax to work, grpc-based APIs will not work on App Engine standard right now.

@nilleb grpc isn't yet supported on App Engine standard.