Skip to content

Commit

Permalink
fix check-dependency-conflicts by updating pip-tools
Browse files Browse the repository at this point in the history
When we updated pip, we missed updating pip-tools to support the newer
pip version, so there were errors (that didn't fail the build, oops)
like these (fixed in pip-tools 5.4, pip-tools-PR-1216:

virtualenv/bin/pip-compile req.txt

Traceback (most recent call last):
  File "virtualenv/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/scripts/compile.py", line 458, in cli
    results = resolver.resolve(max_rounds=max_rounds)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/resolver.py", line 173, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/resolver.py", line 278, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/resolver.py", line 388, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/repositories/local.py", line 75, in get_dependencies
    return self.repository.get_dependencies(ireq)
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/repositories/pypi.py", line 232, in get_dependencies
    download_dir, ireq, wheel_cache
  File "/home/runner/work/st2/st2/virtualenv/lib/python3.6/site-packages/piptools/repositories/pypi.py", line 163, in resolve_reqs
    wheel_download_dir=self._wheel_download_dir,
TypeError: make_requirement_preparer() got an unexpected keyword argument 'wheel_download_dir'
  • Loading branch information
cognifloyd committed Mar 23, 2021
1 parent ac6fb79 commit b2b7917
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ check-dependency-conflicts:
@echo
# Verify there are no conflicting dependencies
cat st2*/requirements.txt contrib/runners/*/requirements.txt | sort -u > req.txt && \
$(VIRTUALENV_DIR)/bin/pip-compile req.txt; \
$(VIRTUALENV_DIR)/bin/pip-compile req.txt || exit 1; \
if [[ -e req.txt ]]; then rm req.txt; fi

.PHONY: virtualenv
Expand Down
6 changes: 4 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ rstcheck>=3.3.1,<3.4
tox==3.14.1
pyrabbit
# pip-tools provides pip-compile: to check for version conflicts
# pip-tools 5.4 needs pip>=20.1, but we use 20.0.2
pip-tools<5.4
# pip-tools 5.3 needs pip<20.3
# pip-tools 5.4 needs pip>=20.1
# pip-tools 6.0 needs pip>=20.3
pip-tools>=5.4,<6.1
pytest==5.4.3
pytest-benchmark==3.2.3
# zstandard is used for micro benchmarks
Expand Down

0 comments on commit b2b7917

Please sign in to comment.