-
Notifications
You must be signed in to change notification settings - Fork 233
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
Install pip on Python 3 as well #1055
base: master
Are you sure you want to change the base?
Conversation
The CI builds failed almost immediately with "E: Unable to locate package chefdk". I don't think that's anything related to the changes here. |
I too doubt that these changes could effect the installation of https://github.com/chef/chef-dk You could make a whitespace change to force Travis to run again. |
Same again. I'm guessing something external to this repository has changed recently. Probably these messages are relevant:
|
Yes... This Travis job is running on Trusty which is EOL travis-ci/docs-travis-ci-com#2449 so Chef no longer builds for Trusty and seems to have dropped support for it from their downloads: https://downloads.chef.io/chefdk Upgrading to Xenial (new Travis default distro) or Bionic will resolve that. |
The fix/workaround from #1051 seems to have made the CI pass. I'm inclined to leave switching the distro it checks on for someone else to do, because I don't know what else that might affect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. Really nice work. The Python Packaging Index (PyPI) download stats are skewed towards Python 2 because CI systems like Travis CI continue to favor pip2 over pip3. This will make it possible for non-Python projects to install their Python packages via pip3.
Given that Python 3.6 is now the default Python on Travis CI it would be good to go even one step further and make pip3 the default pip on non-Python projects on Travis. 139 days until Python 2 EOL. @MariadeAnton @BanzaiMan @native-api @hugovk Your reviews please?
I wasn't aware of that. Do you mean that a I'd say that the |
Thanks. It looks like that's about builds with |
Correct. If language: python is not set the Xenial defaults to python being legacy Python. |
@takluyver Could you please rebase? Now that the Python 2 EOL date has passed the last version of Python 2 (v2.7.18) has been released, it is time to default pip to Python 3. This PR and #1076 try move things forward in this regard. It would be quite useful to get one of them reviewed and landed. |
Rebased. If I understood the various pieces correctly, this should do what was suggested on #1076: Feel free to take over this branch in a new PR if changes are needed; I don't know this machinery well, and I don't have much time to spend on it. |
What is the problem that this PR is trying to fix?
Make
pip
available for Python 3, as well as Python 2, to ease the transition. This is particularly about using Python tools while testing non-Python projects (i.e. not necessarily using the Python language support on Travis). See the discussion on travis-ci/docs-travis-ci-com#2397 for details.If I've understood this correctly, the
pip
command should still use Python 2, to avoid breaking things that rely on that. There will be an additionalpip3
command for Python 3, or people can use thepython3 -m pip
syntax to call it.What approach did you choose and why?
Finding the code that looked like it installs pip for Python 2, and copying it with modifications for Python 3.
How can you make sure the change works as expected?
I'm not, this is educated guesswork.
Would you like any additional feedback?