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

Accept generic ExceptionGroups for raises #13134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tapetersen
Copy link

@tapetersen tapetersen commented Jan 14, 2025

Accept (Base)ExceptionGroup with generic arguments in pytest.raises

Closes #13115

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.

If this change fixes an issue, please:

  • Add text like closes #XYZW to the PR description and/or commits (where XYZW is the issue number). See the github docs for more information.

Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:

  • Create a new changelog file in the changelog folder, with a name like <ISSUE NUMBER>.<TYPE>.rst. See changelog/README.rst for details.

    Write sentences in the past or present tense, examples:

    • Improved verbose diff output with sequences.
    • Terminal summary statistics now use multiple colors.

    Also make sure to end the sentence with a ..

  • Add yourself to AUTHORS in alphabetical order.

@tapetersen tapetersen marked this pull request as draft January 15, 2025 11:00
@tapetersen tapetersen changed the title WIP: Accept generic ExceptionGroups for raises Accept generic ExceptionGroups for raises Jan 15, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jan 15, 2025
@tapetersen tapetersen marked this pull request as ready for review January 15, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided (automation) changelog entry is part of PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Generic Exceptions (ExceptionGroups in particular) with raises in a type-safe manner is not ideal
1 participant