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

Resolve dependency issues in setup.py. #71

Open
bashir2 opened this issue Jan 16, 2018 · 3 comments
Open

Resolve dependency issues in setup.py. #71

bashir2 opened this issue Jan 16, 2018 · 3 comments
Labels

Comments

@bashir2
Copy link
Member

bashir2 commented Jan 16, 2018

Currently we get some dependency conflicts after installing setup.py and that is because pip cannot resolve version dependencies properly. IOW, instead of picking the intersection of version specifiers between different dependencies, it seems pip installs packages one by one independently (see PR #63 for an example). After installation, pipdeptree shows these issues, for example:

$ pipdeptree -p apache-beam

We need to eventually fix this problem either by adding other non-direct dependencies explicitly (which PR #63 does but is ugly) or finding a tool that can resolve all version restrictions together.

@bashir2
Copy link
Member Author

bashir2 commented Jun 26, 2018

Bumping the priority of this issue because it keeps haunting us. Today, I was trying to reproduce an issue that broke the build (sample failure) but couldn't do it in my local environment until I deleted/recreated my virtualenv directory. It turned out the issue is beam version 2.5.0 but pip install --upgrade . kept the 2.4.0 in my old environment (and in either case, it produced some version conflict errors which I think is the main source of the dependency version inconsistency).

Basically we need to make sure that pip install --upgrade . does not produce any warnings/errors and then after that make sure that we have a check that can catch dependency regressions.

@bashir2
Copy link
Member Author

bashir2 commented Jul 12, 2018

To correct a wrong conjecture in my previous message: I think the main reason for not upgrading some packages is that they are not needed by the requirements. When doing pip install --upgrade . there are a lot of lines like this:

Requirement not upgraded as not directly required: google-api-python-client>=1.6 in ./venv/lib/python2.7/site-packages (from gcp-variant-transforms==0.4.0) (1.7.3)

So in this example it kept version 1.7.3 although version 1.7.4 is available. The reason is that it is not necessarily needed based on the requirements. But if I do pip install --upgrade . in a clean virtualenv directory, it picks the latest version, i.e., 1.7.4 in the above example.

@samanvp
Copy link
Member

samanvp commented Mar 12, 2020

httplib2 incompatibility

  • google-api-python-client version 1.7.12 depends on httplib2 0.17.0
  • apache-beam version 2.18.0 depends on httplib2<=0.12.0,>=0.8
  • Following error occurs:
pkg_resources.ContextualVersionConflict: (httplib2 0.17.0 (/home/travis/build/googlegenomics/gcp-variant-transforms/.eggs/httplib2-0.17.0-py2.7.egg), Requirement.parse('httplib2<=0.12.0,>=0.8'), set(['apache-beam']))
Coverage.py warning: No data was collected. (no-data-collected)

samanvp added a commit to samanvp/gcp-variant-transforms that referenced this issue Mar 12, 2020
Our build is broken due to this error message:

pkg_resources.ContextualVersionConflict: (httplib2 0.17.0 (/home/travis/build/googlegenomics/gcp-variant-transforms/.eggs/httplib2-0.17.0-py2.7.egg), Requirement.parse('httplib2<=0.12.0,>=0.8'), set(['apache-beam']))
Coverage.py warning: No data was collected. (no-data-collected)

For more information please refer to issue googlegenomics#71
samanvp added a commit that referenced this issue Mar 12, 2020
Our build is broken due to this error message:

pkg_resources.ContextualVersionConflict: (httplib2 0.17.0 (/home/travis/build/googlegenomics/gcp-variant-transforms/.eggs/httplib2-0.17.0-py2.7.egg), Requirement.parse('httplib2<=0.12.0,>=0.8'), set(['apache-beam']))
Coverage.py warning: No data was collected. (no-data-collected)

For more information please refer to issue #71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants