Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrectly-global-mutating update_wrapper in bash_app #3492

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading