Skip to content

Commit

Permalink
Remove update_wrapper call which mutates the definition of remote_sid…
Browse files Browse the repository at this point in the history
…e_bash_executor (rather than acting functionally...) and was causing problems because of that (by jumbling up definitions from different bash app decorations)
  • Loading branch information
benclifford committed Jun 18, 2024
1 parent 21c4542 commit 49a335f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions parsl/app/bash.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from functools import partial, update_wrapper
from functools import partial
from inspect import Parameter, signature

from parsl.app.app import AppBase
Expand Down Expand Up @@ -123,11 +123,10 @@ def __init__(self, func, data_flow_kernel=None, cache=False, executors='all', ig
if sig.parameters[s].default is not Parameter.empty:
self.kwargs[s] = sig.parameters[s].default

# update_wrapper allows remote_side_bash_executor to masquerade as self.func
# partial is used to attach the first arg the "func" to the remote_side_bash_executor
# this is done to avoid passing a function type in the args which parsl.serializer
# doesn't support
remote_fn = partial(update_wrapper(remote_side_bash_executor, self.func), self.func)
remote_fn = partial(remote_side_bash_executor, self.func)
remote_fn.__name__ = self.func.__name__
self.wrapped_remote_function = wrap_error(remote_fn)

Expand Down

0 comments on commit 49a335f

Please sign in to comment.