Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

allennlp (0.7.2) depends on cffi (1.11.2), gevent (1.3.6) is incompatible wi th allennlp (0.7.2). #2195

Closed
phiresky opened this issue Dec 17, 2018 · 10 comments

Comments

@phiresky
Copy link

this issue still happens (or happens again) with allennlp v0.7.2

[SolverProblemError]                                                  
Because gevent (1.3.6) depends on cffi (>=1.11.5)                                  
 and allennlp (0.7.2) depends on cffi (1.11.2), gevent (1.3.6) is incompatible wi  
th allennlp (0.7.2).                                                               
And because allennlp (0.7.2) depends on gevent (1.3.6), allennlp is forbidden.     
So, because no versions of allennlp match >0.7.2,<0.8.0                            
 and code depends on allennlp (^0.7.2), version solving failed.

Originally posted by @phiresky in #1824 (comment)

@schmmd
Copy link
Member

schmmd commented Dec 19, 2018

@phiresky I'm unfamiliar with poetry. Can you explain to me how I can repeat the error you are seeing on my own laptop?

@phiresky
Copy link
Author

phiresky commented Dec 19, 2018 via email

@sodre
Copy link
Contributor

sodre commented Dec 22, 2018

We experienced the same problem when building the AllenNLP package for conda-forge/staged-recipes#7324. Our solution to that problem was to relax the pinning on cffi to 1.11.*.

This brings me to a slightly larger question of whether the pinnings in AllenNLP are too strict. This issue came up during the peer-review process that every new conda-forge package goes through. Please see comments 1 and 2.

cc: @bgruening

@schmmd
Copy link
Member

schmmd commented Jan 3, 2019

Closing, since we have a new issue with 0.8.0 (#771).

@schmmd schmmd closed this as completed Jan 3, 2019
@sodre
Copy link
Contributor

sodre commented Jan 3, 2019

Sorry, but how is this issue related to #771? 771 is about codecov and this one is about package pinning.

@schmmd
Copy link
Member

schmmd commented Jan 3, 2019

Sorry @sodre--I got confused when I followed the link to python-poetry/poetry#771. It seems like this is still a problem for AllenNLP 0.8.0 and we should relax our bounds on cffi. I'm confused however on how relaxing our bounds on cffi fixes the issue since @phiresky reports that gevent (1.3.6) requires cffi (>=1.11.5) and AllenNLP directly depends on gevent==1.3.6.

@schmmd schmmd reopened this Jan 3, 2019
@sodre
Copy link
Contributor

sodre commented Jan 4, 2019

No problem.

By relaxing allennlp's requirement on cffi to 0.11.* instead of 0.11.2 while keeping gevent at 1.3.6 allows the solver to pick cffi 0.11.5 to solve the package dependency graph.

@schmmd
Copy link
Member

schmmd commented Jan 4, 2019

I'm confused because in the requirements.txt and setup.py we pin cffi to 0.11.5. Your last comment and the title of this issue claims AllenNLP pins cffi to 0.11.2.

Clearly, I'm not expert on Python dependencies.

@sodre do you suggest a change such as https://github.com/allenai/allennlp/pull/2271/files?

@sodre
Copy link
Contributor

sodre commented Jan 4, 2019

@schmmd, The original issue was for AllenNLP 0.7.2, which had it pinned at 0.11.2.

'cffi==1.11.2',

As far as a suggestion, here is what gevent uses.

# The exception is on Windows, where we want the libuv backend we distribute
# to be the default, and that requires cffi; but don't try to install it
# on PyPy or it messes up the build
cffi_requires = [
    "cffi >= 1.11.5 ; sys_platform == 'win32' and platform_python_implementation == 'CPython'",
]

I have not tried to do a build against 0.8.0 yet in conda forge. So I am not sure if the error would still happen with your latest setup.py, even without #2271. My gut tells me it should work just fine.

@schmmd
Copy link
Member

schmmd commented Jan 4, 2019

Since we're not even sure this is a problem with the latest release (0.8.0) I'm going to close this issue in favor of the one I just opened (#2280) about creating a continuous integration check for dependency conflicts. I'd love suggestions about what tool we could use to do such a check.

@schmmd schmmd closed this as completed Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants