Extract public 'dispatch' method from task_sent #427
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses part of #354. (No, really!)
The "Creating your own background task type" portion of the docs discusses the
_task_sent
method, which is private and undocumented, and so we got Sphinx warnings as a result.This PR extracts the part of that method that needs to be public into a new public
BaseFuture.dispatch
method, and updates the docs accordingly.One benefit is that the
dispatch
method is now the only part ofBaseFuture
that assumes that messages have the form(message_type, message_arg)
, so it's the only part ofBaseFuture
that needs to be overridden if that assumption isn't convenient.With this, we're down to 4 Sphinx warnings, all of which are about the
GuiTestAssistant
.