Skip to content

Commit

Permalink
Fix regression in pytest-xdist (#8221)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Sep 29, 2023
1 parent a74f7cf commit 155507d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions distributed/client.py
Expand Up @@ -3091,11 +3091,15 @@ def _get_computation_code(

break

# Ignore IPython related wrapping functions to user code
if hasattr(fr.f_back, "f_globals"):
module_name = sys.modules[fr.f_back.f_globals["__name__"]].__name__ # type: ignore
module_name = fr.f_back.f_globals["__name__"] # type: ignore
if module_name == "__channelexec__":
break # execnet; pytest-xdist # pragma: nocover
# Ignore IPython related wrapping functions to user code
module_name = sys.modules[module_name].__name__
if module_name.endswith("interactiveshell"):
break

return tuple(reversed(code))

def _graph_to_futures(
Expand Down

0 comments on commit 155507d

Please sign in to comment.