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

Improve select()-related exceptions #283

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

llucax
Copy link
Contributor

@llucax llucax commented Mar 6, 2024

  • Don't inherit from BaseException
  • Remove SelectErrorGroup

Fixes #280.

@llucax llucax requested a review from a team as a code owner March 6, 2024 13:32
@llucax llucax self-assigned this Mar 6, 2024
@llucax llucax requested a review from shsms March 6, 2024 13:32
@github-actions github-actions bot added part:docs Affects the documentation part:synchronization Affects the synchronization of multiple sources (`select`, `merge`) labels Mar 6, 2024
@llucax llucax added this to the v1.0.0 milestone Mar 6, 2024
@llucax llucax enabled auto-merge March 6, 2024 13:32
@llucax llucax removed this from the v1.0.0 milestone Mar 6, 2024
According to Python, users should not inherit from `BaseException`, so
we just inherit from `channels.Error` instead.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
This exception is very niche, is not really intended to be caught by
the users, as it should only happen when there is something really
wrong.

If there is any unexpected error during finalization, we just raise a
`BaseExceptionGroup`, which will be automatically converted to a regular
`ExceptionGroup` by Python if there are no `BaseException`s in the
group.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@llucax
Copy link
Contributor Author

llucax commented Mar 6, 2024

Enabled auto-merge.

@llucax llucax added this pull request to the merge queue Mar 6, 2024
Merged via the queue into frequenz-floss:v1.x.x with commit 63c8dc0 Mar 6, 2024
14 checks passed
@llucax llucax deleted the del-baseexception branch March 6, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:docs Affects the documentation part:synchronization Affects the synchronization of multiple sources (`select`, `merge`)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove uses of BaseException
2 participants