-
Notifications
You must be signed in to change notification settings - Fork 116
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
NameError on pkg_resources #401
Comments
See also #90. |
And what version of setuptools is this? It's frustrating trying to get the same results when I have no clue which version you're running against. I don't get this result with the latest setuptools. |
I've got Are you sure it's |
|
Now that I installed setuptools 59.6.0, I can reproduce this error. |
On latest
But this looks like error on their side. |
That's not a crash though, it's a legitimate error reported by Typeguard. |
It seems clear why this happens: The |
For the legitimate error in latest |
I think it may be best to propose that patch against packaging instead. |
Maybe |
Maybe even ALL exceptions, except |
I'm also thinking that it would be perfect to have an option to turn all Compare it to, say, C or Java compiler. When there are errors in you code, it doesn't show you the first error it encounters and quit; instead, it checks all your code and shows you all the errors it finds. That makes fixing those errors simpler and faster. It would be nice if typeguard could behave this way too. |
You mean something like |
Yep, for example. |
I mean, this already exist in Typeguard (link), so why not use it? |
WOW! Thanks! |
Still, I think that catching exceptions (except |
That warn_on_error was added to fulfill your own request here: #85 As for catching all exceptions, I'm not entirely comfortable with that as it might mask some actual bugs in Typeguard itself. |
Great, thank you very much! I somehow missed it. Well, the reality now is there are bugs in typeguard itself. And some of them are still uncaught. For now, I run my Big App under typeguard, it crashes with a problem like this issue, I report it. Then I wait for you to fix it, and then I run my Big App again and catch the next bug, and the cycle repeats. This is extremely slow process. If typeguard bugs were warnings, not crashes, I would be able to catch and report all of them at once. |
Moreover, it seems that ALL exceptions in typeguard-generated code ARE indeed bugs in typeguard. |
My fear is that other people may not report these warnings at all. |
Yeah, I understand it. Maybe it could be another option? |
Something like this could be appropriate: Or something like |
Maybe an undocumented option would be safe enough. |
Thinking more about it, maybe |
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Typeguard version
4.1.4
Python version
3.10.12
What happened?
How can we reproduce the bug?
test.py
:The text was updated successfully, but these errors were encountered: