How to *not* set sys.excepthook? #1024
Unanswered
charmoniumQ
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
It seems that Typer overwrites the
sys.excepthook
here and it's impossible to disable that functionality.This is important because I have a nice
rich.traceback
configuration that suppresses stackframes, customizes width, etc. Typer callsrich.traceback
, but lacks these customization options I want set.Even passing
pretty_exceptions_short=False
still sets thesys.excepthook
to the (ugly) stdlib excepthook here. Arguably, that flag or perhaps a new flag should just avoid settingsys.excepthook
on line 318.I can implement this in a PR, but I was wondering if it would be worth it for others, or if that is a feature that would be accepted.
rich_markup_mode=None is not right either; it disables all of Rich markup; I just want Typer to not overwrite the
sys.excepthook
.Operating System
Linux
Operating System Details
NixOS
Typer Version
0.12.3
Python Version
Python 3.12.5
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions