-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow user to turn off injectStacktrace
#25082
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
base: devel
Are you sure you want to change the base?
Conversation
|
as a side note: it seems like the only utility in these "async tracebacks" is to condense the stack trace removing commonality from "reraised from" traces. It's not a bad idea to do that in general to make them easier to read, so maybe that is a better solution to |
|
I think the fundamental design flaw here is that text-based stack traces are generated at all at the raise site - ie the natural thing to do here would have been to keep a chain of nested This approach would also allow deduplicating them more productively, ie by filtering out any "common base" pointers. |
|
For these async trackbacks specifically, something like that was the first thing that I tried to do. I didn't want to add anything to FutureBase or recolor the final exception, and in the end it seemed impractical to re-use the current data structures for this. Maybe that is why it was done this way to begin with as a lazy hack. I didn't try too hard though because it's hard to justify the time investment when the end result is just slight convenience. So agreed. Either way, given the current behavior, I do wish to turn this off when needed. |
|
@Graveflo I think this injecting the stack trace into the msg is from before "reraised from" existed and it should be removed. Unless there is something I'm missing there is no point to it. A func to get the nicer stack trace (ie |
I'm fine with it being removed. In my experience the feature does something to the effect of factoring the stacks of "reraised from" at the expense of tampering with the exception message re-purposing it as a buffer. I do find it easier to look at that message then scrolling through the reraised call stacks when debugging. I don't think anyone really needs it, and it is dirty so removing it makes sense. Surely a better solution can be made. |
|
@Graveflo Before I added that filtering here it used to just contain the top traceback. There was no point to it afaik. I guess it's nice that it shows the smaller traceback on an unhandled exception now, but it being part of the msg it's sometimes confusing too.
Yes, it's hard to parse very long stack traces, and that's why I added it. But as I said earlier a |
adds
asyncTracebackscompile flag to stopasyncfuturesmodule from overwriting user specified error messages