-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Attrs strips filename information from tracebacks #491
Comments
The problem here is that the |
(I've opened another ticket for your second suggestion since they are separate issues and it might have gotten lost here) |
Ah one more thing: the reason why the file is this weird mumbojumbo is that they are being cached. The same set of attributes gets the same init which makes your wish a bit harder to fulfill. We'd probably have to copy the method object before we change the name and return it. That might be fast enough tho. |
We have “fixed” this as well as we can in #560. Maybe adding file names to docstrings will help further but this as it is cannot be fixed |
With this file, named 'test.py'
The output generated is:
Loosing the filename information completely is incredibly annoying when debugging. I'm currently trying to track down a couple performance issues, and I'm not sure if the
attrs generated init
I happen to be looking at is from my code or from one of the libraries I'm pulling. It would be nice to actually display the real filename with a pointer to the attrs header, but even something like 'attrs generated init for class Coordinates' would be infinitely better.(for example):
The text was updated successfully, but these errors were encountered: