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

Remaining Python 2.7 / 3.5 deprecation warnings #2963

Closed
andy-maier opened this issue Dec 25, 2022 · 1 comment
Closed

Remaining Python 2.7 / 3.5 deprecation warnings #2963

andy-maier opened this issue Dec 25, 2022 · 1 comment

Comments

@andy-maier
Copy link
Contributor

andy-maier commented Dec 25, 2022

The setup-python action used in the test workflow 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. 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

PR #2962 sets that environment variable in the workflow step that invokes the setup-python action. However, while the environment variable is listed in the log, it seems to be ignored because the warning is still shown.

The env var PIP_DISABLE_PIP_VERSION_CHECK=1 works as expected with the setup-python action.

Opened issue actions/setup-python#575 to follow up.

@andy-maier
Copy link
Contributor Author

andy-maier commented Mar 5, 2023

The issue I reported was investigated and it turns out the warning about Python 2.7 is issued in the setup-python action when it invokes python -m ensurepip to get pip upgraded.

I assume that before that upgrade, pip is below the version (presumably 20.0) that introduced support for disabling the warnings via the env var. I think we have to live with that warning.

Closing the issue as won't fix.

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

No branches or pull requests

1 participant