-
Couldn't load subscription status.
- Fork 5
Add missing retry strategy reset in streaming #148
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7293ab6
Clear release notes
llucax 23137ba
Add missing retry strategy reset in streaming
llucax 043e121
Wait for the initial metadata before sending `StreamStarted` event
llucax bcecf65
Use the local ready event instead of passing it as argument
llucax a345940
Fix mocking of the `stream_method` in the `ok_helper` fixture
llucax 30ee943
Fix mocking of error tests
llucax eef9557
Remove wrong extra messages from test
llucax 99b6853
Add test for failures in `initial_metadata()`
llucax bc5fe5f
Don't require using literals for `new_receiver()`
llucax 2711173
Make `num_success` keyword-only
llucax a7be10a
Remove unused private class
llucax 1159958
Test that the retry strategy is reset after a successful start
llucax 4575451
Stop using the deprecated 'close' method for channels
llucax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But here they can pass
Falsefrom a variable and still get typedStreamEvent | OutputT. And there's another overload above that would giveOutputTwhen users sendLiteral[False]. I understand that it is unusable with literals and that in practice we're just adding support for variables while not providing any narrowing. But still, I feel it is a bad idea to do any overloads based on literals and maybe there's a type based solution to this, with sentinels, etc. But I can't think of a nice scheme at the moment, so happy to postpone.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we are providing narrowing when using a literal, so
x.new_receiver(include_events=False)(which is the default) should be typed-> OutputT. The problem is we can properly narrow the return type when a variable is passed. So I would say it is half-useful, but since this half will probably be used in 95% of the cases (the default), I think it is still pretty useful.Gives:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's true. It is a problem only when people start to mess with things. :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I hit the issue only because I parametrized a test, so I started passing a variable to
include_events, but I don't think it will be a common case in practice.