-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
report traceback on plugin loading for certain verbosities #13846
Conversation
CodSpeed Performance ReportMerging #13846 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs news and a test if possible
@@ -104,7 +104,7 @@ def register(self, plugin, name: str | None = None) -> str | None: | |||
raise PluginError( | |||
f"Error while loading conda plugin: " | |||
f"{name or self.get_canonical_name(plugin)} ({err})" | |||
) | |||
) from err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, exception chaining!
Description
Closes #13742
This is the only way I came up with. Not too clean but not horrible either, I think?
We cannot always pass
exc_info
because that will muddle the warnings with the traceback. Instead we only do it depending on the verbosity. With-vv
(INFO) you'll get the traceback:With
-v
or none:Checklist - did you ...
news
directory (using the template) for the next release's release notes?