diff --git a/python/helpers/requirements.txt b/python/helpers/requirements.txt index 1501bbb76c2..179a0244695 100644 --- a/python/helpers/requirements.txt +++ b/python/helpers/requirements.txt @@ -1,5 +1,5 @@ -pip>=21.3.1 # Allow earlier versions to retain python 3.6 support -pip-tools>=6.4.0 # Allow earlier versions to retain python 3.6 support +pip>=21.3.1,<=22.1.1 # Allow earlier versions to retain python 3.6 support +pip-tools>=6.4.0,<=6.6.2 # Allow earlier versions to retain python 3.6 support flake8==4.0.1 hashin==0.17.0 pipenv==2022.4.8 diff --git a/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb b/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb index e02e9ec65e5..02bc234a08d 100644 --- a/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb +++ b/python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb @@ -223,6 +223,7 @@ def install_required_python return if run_command("pyenv versions").include?("#{python_version}\n") run_command("pyenv install -s #{python_version}") + run_command("pyenv exec pip install --upgrade pip") run_command("pyenv exec pip install -r "\ "#{NativeHelpers.python_requirements_path}") end diff --git a/python/lib/dependabot/python/file_updater/poetry_file_updater.rb b/python/lib/dependabot/python/file_updater/poetry_file_updater.rb index cacfdc55a34..bebbd53f360 100644 --- a/python/lib/dependabot/python/file_updater/poetry_file_updater.rb +++ b/python/lib/dependabot/python/file_updater/poetry_file_updater.rb @@ -178,6 +178,7 @@ def updated_lockfile_content_for(pyproject_content) if python_version && !pre_installed_python?(python_version) run_poetry_command("pyenv install -s #{python_version}") + run_poetry_command("pyenv exec pip install --upgrade pip") run_poetry_command("pyenv exec pip install -r"\ "#{NativeHelpers.python_requirements_path}") end diff --git a/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb b/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb index d6227207c5c..15f38ffbc5e 100644 --- a/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb +++ b/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb @@ -313,6 +313,7 @@ def install_required_python return if run_command("pyenv versions").include?("#{python_version}\n") run_command("pyenv install -s #{python_version}") + run_command("pyenv exec pip install --upgrade pip") run_command("pyenv exec pip install -r"\ "#{NativeHelpers.python_requirements_path}") end diff --git a/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb b/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb index a7d2913d90b..89a875a388e 100644 --- a/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb +++ b/python/lib/dependabot/python/update_checker/pipenv_version_resolver.rb @@ -323,6 +323,7 @@ def install_required_python requirements_path = NativeHelpers.python_requirements_path run_command("pyenv install -s #{python_version}") + run_command("pyenv exec pip install --upgrade pip") run_command("pyenv exec pip install -r "\ "#{requirements_path}") end diff --git a/python/lib/dependabot/python/update_checker/poetry_version_resolver.rb b/python/lib/dependabot/python/update_checker/poetry_version_resolver.rb index 3170be35ea4..46d5c97d7f9 100644 --- a/python/lib/dependabot/python/update_checker/poetry_version_resolver.rb +++ b/python/lib/dependabot/python/update_checker/poetry_version_resolver.rb @@ -79,6 +79,7 @@ def fetch_latest_resolvable_version_string(requirement:) if python_version && !pre_installed_python?(python_version) run_poetry_command("pyenv install -s #{python_version}") + run_poetry_command("pyenv exec pip install --upgrade pip") run_poetry_command( "pyenv exec pip install -r "\ "#{NativeHelpers.python_requirements_path}" diff --git a/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb b/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb index 2a5e54a58db..a9fca8374d9 100644 --- a/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb +++ b/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb @@ -116,7 +116,7 @@ end end - context "with a supported python version" do + context "with a supported python version", :slow do let(:python_version) { "3.6.9" } let(:pyproject_fixture_name) { "python_36.toml" } let(:lockfile_fixture_name) { "python_36.lock" }