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

extend apport excepthook detection to also detect partial_apport_excepthook #2838

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

jakkdl
Copy link
Member

@jakkdl jakkdl commented Oct 26, 2023

fixes #2464

A slighly more general fix would be if "apport_excepthook" in getattr(sys.excepthook, "__name__", "") in case they make another slight change to the name of the function.

The issue mentioned that this broke as they updated to Ubuntu 22.10, and all the ubuntu builds in our CI runs on 22.04, which I assume is why this wasn't picked up by the test suite.
It would be great if @Adrien-Luxey or somebody else with easy access to an ubuntu 22.10 machine could run the test suite on master and then this PR to see if it is fixed.

Checking https://github.com/actions/runner-images#available-images it looks like 22.04 is the only available image, so would require a bunch of extra work to get this tested in CI.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #2838 (97b8194) into master (12e2da8) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2838   +/-   ##
=======================================
  Coverage   99.18%   99.18%           
=======================================
  Files         115      115           
  Lines       17585    17585           
  Branches     3140     3140           
=======================================
  Hits        17442    17442           
  Misses         99       99           
  Partials       44       44           
Files Coverage Δ
trio/_core/_multierror.py 100.00% <100.00%> (ø)

Copy link
Contributor

@A5rocks A5rocks left a comment

Choose a reason for hiding this comment

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

This looks like it works. I'll see if I have an up-to-date ubuntu system anywhere...

@A5rocks
Copy link
Contributor

A5rocks commented Oct 29, 2023

Nevermind. Can confirm this appears in Ubuntu 23.10.

Looks like this PR works:

root@65bfcae16d44:/tmp# cat >temp.py <<EOF
> #!/usr/bin/env python3
> import sys
> print(getattr(sys.excepthook, "__name__", None) in ("apport_excepthook", "partial_apport_excepthook"))
> print(sys.excepthook.__name__)
> EOF
root@65bfcae16d44:/tmp# chmod +x ./temp.py
root@65bfcae16d44:/tmp# ./temp.py
True
partial_apport_excepthook

@jakkdl jakkdl merged commit d7c5c64 into python-trio:master Oct 30, 2023
29 checks passed
@jakkdl jakkdl deleted the apport_excepthook branch October 30, 2023 14:53
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.

Apport ExeptHook detection stopped working.
2 participants