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

monkeypatch apport excepthook #88

Merged
merged 17 commits into from
Oct 31, 2023
Merged

Conversation

jakkdl
Copy link
Contributor

@jakkdl jakkdl commented Oct 27, 2023

This mostly just copies over code from trio, that had logic for making sure MultiErrors got printed despite apport messing with sys.__excepthook__. I'm planning to clean up the test code a bit more, and could move it into test_formatting if you want.
I added the -s to pytest in CI to help debugging, but I'll remove it again unless you like verbose tests.

Don't love the traceback.TraceBackException patch code duplication, should probably move that into a separate helper function or something. It could maybe also live outside the if statements (?).

I left the messy commit history I racked up in jakkdl#1 in case you want to see test runs where it failed without the patch.

@coveralls
Copy link

coveralls commented Oct 27, 2023

Pull Request Test Coverage Report for Build 6709099173

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 98.694%

Totals Coverage Status
Change from base Build 6698232197: 0.005%
Covered Lines: 529
Relevant Lines: 536

💛 - Coveralls

Copy link
Owner

@agronholm agronholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly okay, just a few nits.

.github/workflows/test.yml Outdated Show resolved Hide resolved
tests/test_apport_monkeypatching.py Outdated Show resolved Hide resolved
tests/test_apport_monkeypatching.py Outdated Show resolved Hide resolved
src/exceptiongroup/_formatting.py Outdated Show resolved Hide resolved
@agronholm
Copy link
Owner

One more thing: please add a changelog entry.

@jakkdl
Copy link
Contributor Author

jakkdl commented Oct 31, 2023

One more thing: please add a changelog entry.

Done 👍

@agronholm agronholm merged commit fae9d9a into agronholm:main Oct 31, 2023
10 checks passed
@agronholm
Copy link
Owner

Thanks!

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

3 participants