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

Implement a better MultiError exception printer on IPython #205

Closed
njsmith opened this issue Jun 12, 2017 · 2 comments
Closed

Implement a better MultiError exception printer on IPython #205

njsmith opened this issue Jun 12, 2017 · 2 comments

Comments

@njsmith
Copy link
Member

njsmith commented Jun 12, 2017

Right now, trio has some code (in trio/_core/_multierror.py) to detect when it's running under IPython, and if so then it tries to register a special error printer for MultiError exceptions.

Currently, it's a bit lazy though: it just reuses our usual sys.excepthook printer, which gives something that looks like a normal python traceback, not the fancy-shiny traceback that IPython users are accustomed to. This isn't urgent, but at some point it would be good to rewrite this to use IPython's fancy exception printing machinery.

(There is also an annoying limitation in the current IPython exception printing hook API, which is that there can only be one hook installed at a time. Ideally we should be able to install our hook without colliding with anyone else who might also be trying to use this hook. But this will need changes to IPython upstream.)

CC: @Carreau

@Carreau
Copy link
Contributor

Carreau commented Jun 12, 2017

I've been meaning to refactor extracting the tracebacks tools of IPython I can also try to pull it as a seprate package that does not depends on IPython.
https://github.com/Qix-/better-exceptions might also be a thing to look at.

@Carreau Carreau self-assigned this Jun 12, 2017
@Zac-HD
Copy link
Member

Zac-HD commented Oct 30, 2022

Closing this because MultiError.catch() is deprecated in favor of exceptiongroup.catch() (or except*, on Python 3.11).

Per ipython/ipython#13753 there are still some rough edges, but since #2213 that's not really Trio's problem.

@Zac-HD Zac-HD closed this as completed Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants