Hi all, I wanted to share an issue I ran into, how...
# general
c
Hi all, I wanted to share an issue I ran into, how I worked around it, and if it can be done better. I had to add a 3rd party dependency (Python) - lets call it "library A" which had a sub-dependency that could not be resolved due to version mismatches with another 3rd party dependency's sub-dependency (Library B). So library A has a requirement DEP>3.0,<4.0 And library B has a requirement DEP>4.0 Now I found out that the version of DEP in library A was unnecessarily tightened. and e.g. 4.0.3 would have worked fine in this case! Now my challenge is how to loosen those constraints, as those library's are 3rd party dependencies I don't know how to override a sub dependency constraint in Pants. My solution was to just fork the repo publicly and change the requirements.txt file - but I was hoping there was a way to just override a 3rd party dependency's sub-dependency. If anyone has any thoughts on this, would be cool to hear it! Or maybe a potential improvement? Happy to hear anyone's thoughts. Thanks!
b
Constraints files might be a useful workaround here? https://www.pantsbuild.org/2.18/docs/python/overview/third-party-dependencies#constraints-files In the past, I’ve done the same thing that you did to fork the repo + change requirements.txt
c
So I tried this, but it would still complain about the sub-dependencies version as well - though I might have done it incorrectly
b
Looks like this might be an underlying issue in Pip: https://github.com/pypa/pip/issues/8076 and someone ran into your exact issue: https://github.com/pypa/pip/issues/8076#issuecomment-1217850316
👍 1