This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Convert the typing handler to async/await.#7679
Merged
Conversation
ada08e3 to
600d412
Compare
richvdh
reviewed
Jun 17, 2020
| self.assertEquals(self.event_source.get_current_key(), 0) | ||
|
|
||
| self.successResultOf( | ||
| self.get_success( |
Member
There was a problem hiding this comment.
these aren't quite the same thing. successResultOf asserts that the thing has already completed; get_success does not do that. I think tests.test_utils.get_awaitable_result should do what you want here.
That said, it probably doesn't matter here.
Member
Author
There was a problem hiding this comment.
get_success seems to just handle if it is an awaitable, wrap it in a ensureDeferred and then call successResultOf:
Lines 443 to 449 in 0361932
So I think it does the same thing?
Member
There was a problem hiding this comment.
The difference is the self.pump.
48 tasks
babolivier
pushed a commit
that referenced
this pull request
Sep 1, 2021
* commit '363082561': Convert the typing handler to async/await. (#7679)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
There's a couple of odd methods in here, in particular:
_stopped_typingwas yielded, but wasn't aDeferred.get_new_eventsdoesn't need to be a coroutine, but I think it expects to be one based on the callers.get_successneed to be used in tests instead ofgetSuccessOffor old deps, I think.