Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Oct 10, 2021

Fixes actions/setup-python#233.

I often see "errors" like this when testing Python 3.10:

image
https://github.com/bridgecrewio/checkov/actions/runs/1325650057

WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available. You should consider upgrading via the '/opt/hostedtoolcache/Python/3.10.0/x64/bin/python -m pip install --upgrade pip' command.

Several problems here:

  • It's a warning, but shown as an error ("2 errors" in screenshot). 

  • The "error" doesn't fail the build (this is actually a good thing, but still confusing).

  • There's nothing I can actually do about this, it happens during actions/setup-python.

  • False warnings mean people start to ignore real warnings.

  • And ironically it warns to upgrade pip at the same time it is actually upgrading pip!


Let's disable the warning/error using:

  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for
                              download. Implied with --no-index.

Local test, first install an old version and then test the install command:

Before

$ python -m pip install pip==21.2.3

Collecting pip==21.2.3
  Using cached pip-21.2.3-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-21.2.3
$ python -m pip install --ignore-installed pip --no-warn-script-location
Collecting pip
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
Successfully installed pip-21.2.4
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install --upgrade pip' command.

After

$ python -m pip install pip==21.2.3

Collecting pip==21.2.3
  Using cached pip-21.2.3-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-21.2.3
$ python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location
Collecting pip
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
Successfully installed pip-21.2.4

@umarcor
Copy link

umarcor commented Oct 17, 2021

Can some maintainer please approve workflow execution in this PR?

@MaksimZhukov MaksimZhukov merged commit 641a276 into actions:main Oct 18, 2021
@MaksimZhukov
Copy link
Contributor

Hello @hugovk ! Thank you for the contribution!
We will rebuild Python versions soon.

@nikita-bykov
Copy link

We've successfully rebuilt the following Python versions:

  • 3.11.0-alpha.1
  • 3.10.0
  • 3.9.6
  • 3.8.12
  • 3.8.10
  • 3.8.6

@jugmac00
Copy link

Hugo pointed me to this issue today, as I encountered this problem in a CI run for Python3.5-based project.

I know I know, while Python 3.5 is eol upstream, distros still support it for years to come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conflicting communication about pip versions in action output
8 participants