-
Notifications
You must be signed in to change notification settings - Fork 12
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
Stream contexts #206
Merged
Merged
Stream contexts #206
Commits on Apr 28, 2021
-
Aggregate and organize streaming components
Move receive stream into streaming modules and rebrand as a "message stream". Factor out cancellation mechanics in `.aclose()` into the `Context` type which will soon provide the api for for cancelling portal invocations. Comment-stage a few methods on both types in anticipation of a new bi-directional streaming api. Add a `MsgStream` bidirectional channel type which will be the eventual type yielded from `Context.open_stream()`. Adjust the response/dialog types to be the set `{'asyncfun', 'asyncgen', 'context'}`. OH, and add async func checking in `Portal.run()` to catch and error on sync funcs early.
Configuration menu - View commit details
-
Copy full SHA for 7f38b72 - Browse repository at this point
Copy the full SHA 7f38b72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 897ab79 - Browse repository at this point
Copy the full SHA 897ab79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81f3558 - Browse repository at this point
Copy the full SHA 81f3558View commit details -
NB: this is a breaking change removing support for `Portal.run()` being able to invoke remote streaming functions and instead replacing the method call with an async context manager api `Portal.open_stream_from()` This style explicitly defines stream teardown at the call site instead of expecting the user to handle tricky things correctly themselves: eg. `async_geneartor.aclosing()`. Going forward `Portal.run()` can be used only for invoking async functions.
Configuration menu - View commit details
-
Copy full SHA for 3625135 - Browse repository at this point
Copy the full SHA 3625135View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80c96ca - Browse repository at this point
Copy the full SHA 80c96caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e19fd3 - Browse repository at this point
Copy the full SHA 3e19fd3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad9256b - Browse repository at this point
Copy the full SHA ad9256bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83af295 - Browse repository at this point
Copy the full SHA 83af295View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86fc418 - Browse repository at this point
Copy the full SHA 86fc418View commit details -
Configuration menu - View commit details
-
Copy full SHA for f59346d - Browse repository at this point
Copy the full SHA f59346dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a5e6ba - Browse repository at this point
Copy the full SHA 5a5e6baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2498a49 - Browse repository at this point
Copy the full SHA 2498a49View commit details -
De-compact async with tuple on 3.8-
Turns out can't use the nicer syntax before python 3.9 (even though it doesn't seem documented anywhere?). Relates to #207
Configuration menu - View commit details
-
Copy full SHA for b1f657e - Browse repository at this point
Copy the full SHA b1f657eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc36e73 - Browse repository at this point
Copy the full SHA fc36e73View commit details
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.