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

fix: don't set excepthook unless pretty_exceptions_enable #1030

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 26, 2024

  1. fix: don't set excepthook unless pretty_exceptions_enable

    Previously, pretty_exceptions_enable means "set sys.excepthook to the default exception handler". This commit changes the interpretation to "simply don't change sys.excepthook at all". If it was the default handler before, it will remain the default handler. If it was a customized excepthook before, it will remain a customized excepthook.
    
    This interpretation gives more control to users when pretty_exceptions_enable is False, while maintaining the same out-of-the-box experience for users who leave it at its default (True).
    
    Since sys.excepthook is for uncaught exceptions, it will be read directly by humans, I don't expect this change to break any users of Typer. Most users would leave pretty_exceptions_enable to the default (True), and that behavior did not change at all in this commit.
    charmoniumQ authored Oct 26, 2024
    Configuration menu
    Copy the full SHA
    5a63876 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0103a28 View commit details
    Browse the repository at this point in the history