Skip to content
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

Flask, Connexion, Click Dependency Mismatches #533

Closed
mo-fu opened this issue Oct 11, 2021 · 3 comments · Fixed by #534
Closed

Flask, Connexion, Click Dependency Mismatches #533

mo-fu opened this issue Oct 11, 2021 · 3 comments · Fixed by #534
Labels
Milestone

Comments

@mo-fu
Copy link
Contributor

mo-fu commented Oct 11, 2021

I observed a dependency mismatch in annif==0.54.* In fact I got this also for older versions.
This leads to an error exit code when using pipenv. I think you don't support pipenv at the moment. I still wanted to report this as other projects may want to use annif as dependency when using pipenv. Additionally the dependency conflict is still there even if it is not reported via exit code when using pip.

Steps to reproduce:

mkdir /tmp/pipenv_test
cd /tmp/pipenv_test
pipenv --python 3.8
pipenv install "annif==0.54.*"

This threw an error with respect to the version of Werkzeug: Could not find a version that matches werkzeug<2.0,>=1.0,>=2.0
Turns out that the most recent published version of Connexion requires Flask<2.0 But Pipenv installed Flask 2.0.2 I tried to install Connexion first. This would install flask 1.1.4 which has a dependency click<8.0,>=5.1. This conflicts with the annif dependency specification 'click==8.0.*',
Since the pinning is probably on purpose, I hand this over to you.
Hint: The current master of Connexion sets 'flask>=1.0.4,<3' So this will probably be resolved in the future.

When installing using pip without pipenv, as done for the Docker container, this will print an error and install click==8.0.3. The exit code will indicate a success.

As a workaround with pipenv you can do the following:

pipenv shell
pip install "annif==0.54.*"

But is is not possible to add annif to a Pipfile.

@osma osma added the bug label Oct 11, 2021
@osma osma added this to the Short term milestone Oct 11, 2021
@osma
Copy link
Member

osma commented Oct 11, 2021

Thanks @mo-fu , good catch!

It seems that we were too eager in upgrading to Click 8 in PR #499 when we upgraded dependencies before the 0.53 release. Then the idea was simply to upgrade all dependencies to the most recent releases that didn't cause problems, but we didn't notice this conflict.

I also had to downgrade to Click 7 (see this comment). in (draft) PR #527 that adds spaCy support.

If we simply downgraded to click==7.1.2 as already done in PR #527, would that solve the issue? I'm not using pipenv at the moment (it was just too frustrating to work with).

@mo-fu
Copy link
Contributor Author

mo-fu commented Oct 11, 2021

I can't really tell because pipenv is best used for packages on pypi (You probably knew this already). But I checked out the branch from #527 and when isntalling using PIP the conflict is still printed during the installation. Only Fix I found so far is setting flask>=1.0.4,<2 as in Connexion

@osma
Copy link
Member

osma commented Oct 11, 2021

OK thanks, sounds reasonable. Currently we haven't pinned Flask to a specific version (or version range) in setup.py but apparently that is part of the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants