prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [BUG] Cannot import new_client
  **Describe the bug**
  When trying to import ``new_client`` from ``mars.actors`` in Python 2.7 in Linux, a ValueError is raised:
  
  ```
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "mars/actors/core.pyx", line 147, in mars.actors.core.new_client
      cpdef object new_client(object parallel=None, str backend='gevent'):
    File "mars/actors/core.pyx", line 151, in mars.actors.core.new_client
      from .pool.gevent_pool import ActorClient
    File "mars/actors/pool/gevent_pool.pyx", line 38, in init mars.actors.pool.gevent_pool
      from ...lib import gipc
    File "mars/lib/gipc.pyx", line 1159, in init mars.lib.gipc
      __exec("""def _reraise(tp, value, tb=None):
    File "mars/lib/gipc.pyx", line 1150, in mars.lib.gipc.__exec
      frame = sys._getframe(1)
  ValueError: call stack is not deep enough
  ```
  
  **To Reproduce**
  ```python
  >>> from mars.actors import new_client
  >>> client = new_client()
  ```
  
  </issue>
  <code>
  [start of mars/actors/__init__.py]
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 # Copyright 1999-2018 Alibaba Group Holding Ltd.
  4 #
  5 # Licensed under the Apache License, Version 2.0 (the "License");
  6 # you may not use this file except in compliance with the License.
  7 # You may obtain a copy of the License at
  8 #
  9 #      http://www.apache.org/licenses/LICENSE-2.0
  10 #
  11 # Unless required by applicable law or agreed to in writing, software
  12 # distributed under the License is distributed on an "AS IS" BASIS,
  13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 # See the License for the specific language governing permissions and
  15 # limitations under the License.
  16 
  17 
  18 from .core import create_actor_pool, Actor, FunctionActor, new_client, \
  19     register_actor_implementation, unregister_actor_implementation
  20 from .errors import ActorPoolNotStarted, ActorNotExist, ActorAlreadyExist
  21 from .distributor import Distributor
  22
  [end of mars/actors/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/mars/actors/__init__.py b/mars/actors/__init__.py
  --- a/mars/actors/__init__.py
  +++ b/mars/actors/__init__.py
  @@ -14,8 +14,14 @@
   # See the License for the specific language governing permissions and
   # limitations under the License.
   
  -
   from .core import create_actor_pool, Actor, FunctionActor, new_client, \
       register_actor_implementation, unregister_actor_implementation
   from .errors import ActorPoolNotStarted, ActorNotExist, ActorAlreadyExist
   from .distributor import Distributor
  +
  +# import gipc first to avoid stack issue of `call stack is not deep enough`
  +try:
  +    from ..lib import gipc
  +    del gipc
  +except ImportError:  # pragma: no cover
  +    pass
  
verification_info: {"golden_diff": "diff --git a/mars/actors/__init__.py b/mars/actors/__init__.py\n--- a/mars/actors/__init__.py\n+++ b/mars/actors/__init__.py\n@@ -14,8 +14,14 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-\n from .core import create_actor_pool, Actor, FunctionActor, new_client, \\\n     register_actor_implementation, unregister_actor_implementation\n from .errors import ActorPoolNotStarted, ActorNotExist, ActorAlreadyExist\n from .distributor import Distributor\n+\n+# import gipc first to avoid stack issue of `call stack is not deep enough`\n+try:\n+    from ..lib import gipc\n+    del gipc\n+except ImportError:  # pragma: no cover\n+    pass\n", "issue": "[BUG] Cannot import new_client\n**Describe the bug**\r\nWhen trying to import ``new_client`` from ``mars.actors`` in Python 2.7 in Linux, a ValueError is raised:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"mars/actors/core.pyx\", line 147, in mars.actors.core.new_client\r\n    cpdef object new_client(object parallel=None, str backend='gevent'):\r\n  File \"mars/actors/core.pyx\", line 151, in mars.actors.core.new_client\r\n    from .pool.gevent_pool import ActorClient\r\n  File \"mars/actors/pool/gevent_pool.pyx\", line 38, in init mars.actors.pool.gevent_pool\r\n    from ...lib import gipc\r\n  File \"mars/lib/gipc.pyx\", line 1159, in init mars.lib.gipc\r\n    __exec(\"\"\"def _reraise(tp, value, tb=None):\r\n  File \"mars/lib/gipc.pyx\", line 1150, in mars.lib.gipc.__exec\r\n    frame = sys._getframe(1)\r\nValueError: call stack is not deep enough\r\n```\r\n\r\n**To Reproduce**\r\n```python\r\n>>> from mars.actors import new_client\r\n>>> client = new_client()\r\n```\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\nfrom .core import create_actor_pool, Actor, FunctionActor, new_client, \\\n    register_actor_implementation, unregister_actor_implementation\nfrom .errors import ActorPoolNotStarted, ActorNotExist, ActorAlreadyExist\nfrom .distributor import Distributor\n", "path": "mars/actors/__init__.py"}]}