You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setup-python action invokes pip. On Python 2.7 and 3.5, the pip invocation displays a Python deprecation message:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as
Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
More details about Python 2support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
That warning shows up in the actions summary and clutters up the summary. We do know that Python 2.7 is deprecated and still need to support it, so we are interested in real information in the summary. The same happens on Python 3.5.
When running pip locally, it is possible to disable that warning by setting the environment variable:
PIP_NO_PYTHON_VERSION_WARNING=1
However, setting that environment variable in the workflow step that invokes the setup-python action lists the variable, but the warning is still shown.
Here is the workflow step with the variable:
- name: Set up Python ${{ matrix.python-version }}
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_NO_PYTHON_VERSION_WARNING: 1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
By the way, the env var PIP_DISABLE_PIP_VERSION_CHECK=1 works as expected with the setup-python action.
Action version:
v4
Platform:
Ubuntu
macOS
Windows
Runner type:
Hosted
Self-hosted
Tools version:
Python 2.7
Repro steps:
Use the setup-python action in a workflow with Python 2.7 to see the deprecation warning.
Set the env var PIP_NO_PYTHON_VERSION_WARNING=1 for that workflow step, and the deprecation warning is still there.
Run pip locally on Python 2.7 with that env var, end the deprecation warning is gone.
Expected behavior:
The env var PIP_NO_PYTHON_VERSION_WARNING=1 should be honored.
Actual behavior:
See above
The text was updated successfully, but these errors were encountered:
Hello @andy-maier , i am going to close this issue because it does not relate to the action, but feel free to reopen the issue or create a new one in case if the problem exists.
The env vars were introduced in pip 20.0 (I think), and I assume it happens because before the upgrade of pip, it is below that version. After the upgrade (e.g. in the rest of my workflow), the env vars are honored and the warning is not shown.
I agree with closing the issue. Thanks for investigating!
Description:
The setup-python action invokes pip. On Python 2.7 and 3.5, the pip invocation displays a Python deprecation message:
That warning shows up in the actions summary and clutters up the summary. We do know that Python 2.7 is deprecated and still need to support it, so we are interested in real information in the summary. The same happens on Python 3.5.
When running pip locally, it is possible to disable that warning by setting the environment variable:
However, setting that environment variable in the workflow step that invokes the setup-python action lists the variable, but the warning is still shown.
Here is the workflow step with the variable:
By the way, the env var PIP_DISABLE_PIP_VERSION_CHECK=1 works as expected with the setup-python action.
Action version:
v4
Platform:
Runner type:
Tools version:
Python 2.7
Repro steps:
Expected behavior:
The env var PIP_NO_PYTHON_VERSION_WARNING=1 should be honored.
Actual behavior:
See above
The text was updated successfully, but these errors were encountered: