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

Support the exceptiongroup PyPi package #338

Merged
merged 4 commits into from
Feb 16, 2023
Merged

Conversation

imjoehaines
Copy link
Member

Goal

The exceptiongroup PyPi package is used by a number of projects to support Python 3.11's ExceptionGroup on older Python versions

This PR adds support for this package to bugsnag-python so that its back-ported ExceptionGroup is treated identically to the built-in ExceptionGroup

This is a tiny change to our library code, but the diff is big because of some finagling required to test it properly

Testing

The ExceptionGroup tests are now in their own file so that it can be run individually, though it's still part of the regular test suite

The test suite now also runs the above file with the exceptiongroup package installed on all of its supported Python versions (3.7+)

This gives us coverage of native exception groups on 3.11 and coverage of the exceptiongroup package on 3.7+ with the exact same tests

This provides a backport of exception group functionality to Python 3.7+
This prevents different line numbers being reported by Python 3.7 vs
newer versions

It's maybe a little harder to read, but this is just a fixture file and
shouldn't need to be updated often/at all
@imjoehaines imjoehaines merged commit 3dace3a into next Feb 16, 2023
@imjoehaines imjoehaines deleted the exceptiongroup-pypi branch February 16, 2023 12:02
@imjoehaines imjoehaines mentioned this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants