Skip to content

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

Merged
kitchoi merged 2 commits into
masterfrom
977-remove-named-argument
May 7, 2020
Merged

Maint: Avoid calling observe's dispatch with named arguments#1065
kitchoi merged 2 commits into
masterfrom
977-remove-named-argument

Conversation

@kitchoi
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants