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 legacy support for running a function in run? #813

Closed
henryiii opened this issue Apr 9, 2024 · 0 comments · Fixed by #815
Closed

Remove legacy support for running a function in run? #813

henryiii opened this issue Apr 9, 2024 · 0 comments · Fixed by #815

Comments

@henryiii
Copy link
Collaborator

henryiii commented Apr 9, 2024

There's a legacy feature where session.run([f, arg1], kw=1) will run f(arg1, kw=1) for you, with a little bit of logging. I'm working on improving the static typing a bit, and this is messy. It's not in the static typing, it interferes with normal keyword arguments, and it has a bug: env= and include_outer_env= just get thrown away and aren't passed through. To support it properly, everything would need to be **kwargs, which I'm trying to get rid of (better static typing, better docstrings, better signatures). I could fix the static typing via TypedDict, but I'd much rather just remove the feature (described as "legacy" in comments) if it's acceptable.

By remove, I really mean remove the keyword argument passing, I don't care about the positional argument only form unless I have to add it to typing. We could leave that in, at least for a while, if someone wants it. It's the keywords that are problematic and currently buggy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant