-
Notifications
You must be signed in to change notification settings - Fork 44
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
add kiwisolver not install warning for import error #1019
Conversation
As discussed during the standup, let's move from using |
Just to make sure I understand: the problem being solved here is that while If so, I don't think we want any sort of warning for general Enable use (e.g., when importing |
Thanks for the comments. There are about 10 tests that are using this package, it seems inefficient if we try to add individual warnings to each of them. Is there a way we can add warning for all the imports (like wrapping imports with a decorator)? |
For tests that require kiwisolver you want to skip the tests unless it is installed, not warn. But also it should possibly be in the "test" optional dependencies. Edit to add: which it looks is exactly what the tests are doing. |
I think the tests are fine as they are - we're already skipping the tests for For the examples, I see two examples that use the One other possibility, available since Python 3.7 (see PEP 562), would be to add a module-level |
Thanks @mdickinson and @corranwebster. Agreed on not needing any noise with the warnings for general enable use. @homosapien-lcy as @mdickinson suggests, let's just get the two examples updated with a better error message. |
OK, got it fixed |
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.
LGTM
Now, kiwisolver is listed as optional but in some demo as mentioned in issue #1018, it can raise import error. This PR gives a specific error when it's not installed and the related tests are run. Closes #1018