Skip to content
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 14 commits into from
May 4, 2021
Merged

Stream contexts #206

merged 14 commits into from
May 4, 2021

Commits on Apr 28, 2021

  1. 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.
    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    7f38b72 View commit details
    Browse the repository at this point in the history
  2. Add a no runtime error

    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    897ab79 View commit details
    Browse the repository at this point in the history
  3. Formatting

    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    81f3558 View commit details
    Browse the repository at this point in the history
  4. Add a new one-way stream API

    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.
    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    3625135 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    80c96ca View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3e19fd3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ad9256b View commit details
    Browse the repository at this point in the history
  8. Fix func type checking

    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    83af295 View commit details
    Browse the repository at this point in the history
  9. Error on bad registry pops

    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    86fc418 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f59346d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5a5e6ba View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2498a49 View commit details
    Browse the repository at this point in the history
  13. 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
    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    b1f657e View commit details
    Browse the repository at this point in the history
  14. Comment out MsgStream for now

    goodboy committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    fc36e73 View commit details
    Browse the repository at this point in the history