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

add support for setting protocol handlers with {.raises.} annotation #1064

Merged
merged 8 commits into from
Mar 28, 2024

Commits on Mar 11, 2024

  1. add support for setting protocol handlers with {.raises.} annotation

    All of the internal protocol handlers are restricted to `{.raises.}` of
    `[CancelledError]`. However, the `LPProtoHandler` type is part of the
    public interface, and example / test code raises more errors than just
    `[CancelledError]`. The caller is aware of that and `CatchableError` is
    caught.
    
    To allow annotating the internal handlers with the proper `{.raises`.}
    annotation, support for an extra `LPProtoHandler2` is added. This is
    backward compatible as the old `LPProtoHandler` is still allowed.
    Examples still compile fine. There is one test that needs a slight
    adjustment as it accesses the internal `handler` field directly. That
    field needs to be renamed so that the `template` is used instead.
    
    Eventually, `LPProtoHandler` may be phased out, with appropriate notices
    to users who define custom handlers and the migration requiring errors
    to be handled inside the handler instead of raising them. At this time,
    such a deprecation is not yet applied, especially while the internal
    logic is still relying on the previous handler flow.
    etan-status committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    14fee3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    417922c View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. Configuration menu
    Copy the full SHA
    302359b View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Configuration menu
    Copy the full SHA
    69f18ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    843fb45 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    967c40c View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. Configuration menu
    Copy the full SHA
    71dbcef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3af3aa5 View commit details
    Browse the repository at this point in the history