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

Upgrade six package to fix issues with new pip #6871

Merged
merged 2 commits into from
May 15, 2020

Conversation

bjester
Copy link
Member

@bjester bjester commented May 13, 2020

Summary

When setting up a Kolibri dev instance with pip>=20, pip becomes broken after running pip install -r requirements/base.txt --upgrade. This is because that version of pip requires a higher version of six than the pinned version Kolibri has specified in base.txt

$ pip install -r requirements/dev.txt --upgrade
Traceback (most recent call last):
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/bin/pip", line 8, in <module>
    sys.exit(main())
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/cli/main.py", line 73, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
    module = importlib.import_module(module_path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 24, in <module>
    from pip._internal.cli.req_command import RequirementCommand
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
    from pip._internal.operations.prepare import RequirementPreparer
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 16, in <module>
    from pip._internal.distributions import (
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/distributions/__init__.py", line 2, in <module>
    from pip._internal.distributions.wheel import WheelDistribution
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/distributions/wheel.py", line 5, in <module>
    from pip._internal.utils.wheel import pkg_resources_distribution_for_wheel
  File "/home/bjester/.local/share/virtualenvs/kolibri-J0Tqdocd/lib/python3.6/site-packages/pip/_internal/utils/wheel.py", line 12, in <module>
    from pip._vendor.six import PY2, ensure_str
ImportError: cannot import name 'ensure_str'

References

pypa/virtualenv#1551


Contributor Checklist

PR process:

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Testing:

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

Reviewer Checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

bjester added 2 commits May 13, 2020 10:38
Update `six` package since pip v20 requires a higher version to function
@bjester bjester added the TODO: needs review Waiting for review label May 13, 2020
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If travis is ok with it, I'm ok with it.

@codecov
Copy link

codecov bot commented May 15, 2020

Codecov Report

Merging #6871 into develop will not change coverage.
The diff coverage is n/a.

@bjester bjester merged commit 4c96111 into learningequality:develop May 15, 2020
@bjester bjester deleted the six-upgrade branch May 15, 2020 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants