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
Update click to 8 #432
Update click to 8 #432
Conversation
Wow this is huge. Thanks 🙏 We'll look into this soon. |
requirements.txt
Outdated
@@ -1,5 +1,5 @@ | |||
arrow>=1.0.0 | |||
click>=7.0,<8.0 | |||
click>=8.0,<9.0 |
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.
I don't think we should explicitly forbid 9.0, we don't know if that will be a breaking change for us yet. We usually try to avoid pinning versions if we can.
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.
I restricted to 8 partly because it was a "MAJOR" semver version change (7 to 8) that broke Watson. I'm not familiar with either project, but shouldn't major releases of dependencies only be (explicitly) updated to once they've been tested due to the likelihood of breaking changes?
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.
This is a long debate in the Python community :) . So far my opinion is to allow any version of a dependency as long as you don't know for sure that you're not compatible with it. This is less of an issue if you isolate the dependencies of each Python project you're using, but if you're not doing it things can get messy pretty quickly if everybody is asking for specific versions of a package for no proper reason.
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.
Huh - interesting! Seems like asking for trouble to me. :D Will you remove the <9 requirement or should I?
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.
Hi David! Can you fix this, and then I'll merge your work and release it. Thanks!
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.
Thanks! Done.
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.
Indeed I don't think those should have been marked as "multiple", this was probably a bad copy/paste in the first place 😄 .
This looks to me, except for the small comment about the pinned version 👍 . Thank you very much!
I'm not pro Python user and don't much about test suits, but my test with this pr on my local computer works fine plus I did a simple pytest and there was 250 passed, 14 warning, 91 errors as following gist. I simply did a |
@mizhozan, I also had those fixture-related failures. The solution seemed to be install the dev requirements from requirements-dev.txt. (See the varying mock versions depending on the version of setuptools you have.) |
@DavidOliver Thanks a lot, now the test runs perfectly with 341 passes and 14 warnings according to this gist.
|
As requested by maintainers.
@mizhozan Thanks. I think I managed to confuse myself regarding the versions of packages I had installed. I've just (re-?)re-installed click (8.0.1), and now I also have the deprection warnings when running the tests. @jmaupetit Can you hold off on merging, please? I'll see if I can get rid of the deprecation warnings. |
The deprecation warnings in the tests are now gone (see last commit), but I'm out of my depth here and can't know whether or not more needs to be done to properly update to click 8. From the changelog:
Regarding Regarding env var values to start completion, I've searched for |
pythonPackages brings click 8. Unfortunately, watson is not ready to consume this library yet. Fix by explicitly pulling in click 7 as dependency. See these upstream discussions: TailorDev/Watson#430 TailorDev/Watson#432
Ran into this issue today. Would love to see this merged in. |
It's been almost a year, what's the status on this? |
Rebased and merged in #471 |
Warning: I don't know what I'm doing; I don't usually use Python and this is my first time with Watson's code, so this pull request should be treated with caution. But hopefully it can at least act as the start of a fix for use of click v8.
The cause of #430 seems to be this (click v8 changes):
'Multiple options' at click documentation.
I remove
multiple=True
from several click options, which I don't believe are intended to be specified at the command line more than once as they seem to be flags rather than options which take (multiple) values.I believe I've successfully run Watson's tests, which all seem to be passing.
By the way, will a new release of Watson be prepared soon, either with the temporary fix of specifying v7 of click or this fix? I ask as I'm currently working on my system config. :)