PEP-654 ExceptionGroup support in python<3.11
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
New
|
Undecided
|
Unassigned |
Bug Description
Hello,
python3.11 introduced ExceptionGroups[1], which Apport manages to format perfectly fine on python>=3.11 - but there is a backport package[2] for python<3.11 which relies on monkeypatching sys.excepthook to reformat the exception and get it to properly print sub-exceptions. This clashes with Apport, which also monkeypatches sys.excepthook in order to collect debugging information.
I recently wrote a PR[3] to the exceptiongroup repo with a messy workaround to work with Apport, but it would be much cleaner if Apport could make use of the backport package itself - and that would also avoid issues that might arise from Apport changing its hook[4]
[1] PEP 654: https:/
[2] Backport package: https:/
[3] ExceptionGroup PR: https:/
[4] Issue that arose when apport renamed its hook https:/
Issue in agronholm/
I might be able to write a PR that implements it and submit it to your GitHub in case you deem this valuable but low priority.