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

Maint: Avoid calling observe's dispatch with named arguments #1065

Merged
merged 2 commits into from
May 7, 2020

Conversation

kitchoi
Copy link
Contributor

@kitchoi kitchoi commented May 5, 2020

Related to #977

This PR removes the requirement on the event argument name for the dispatch callable, as the requirement unnecessarily forbids the use of other generic dispatch-like functions, such as concurrent.futures.Executor.submit(callable, *args, **kwargs). With this, it will be possible to use something like Executor.submit as the dispatch callable.
(Whether to expose this flexibility to the user API is a separate discussion though.)

Checklist

  • Tests
  • Update API reference (docs/source/traits_api_reference)
  • Update User manual (docs/source/traits_user_manual)
  • Update type annotation hints in traits-stubs

@kitchoi kitchoi changed the title Maint: Avoid calling dispatch with named arguments Maint: Avoid calling observe's dispatch with named arguments May 5, 2020
Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change.

@kitchoi kitchoi merged commit d4fc3c9 into master May 7, 2020
@kitchoi kitchoi deleted the 977-remove-named-argument branch May 7, 2020 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants