5 ms·
I don't understand: why can't people just use the last version of Pip that supports Python 2?
by dmitryminkovsky 6y ago
I don't understand: why can't people just use the last version of Pip that supports Python 2?
- Wowfunhappy 6y agoI guess the question is whether the servers will stay up. I was assuming they would not. If they go down, it will be a really major headache.
- dmitryminkovsky 6y agoMy understanding is that Pip uses PyPI so, yeah, if PyPI changes their APIs/URLs, this last version of Pip that supports Python 2 will stop working and then deployments will start breaking.
- zzzeek 6y agoYou can point pip to whatever URL you want, and APIs use versioning.
- geofft 6y agoThere isn't a separate set of servers. The same servers (https://pypi.org https://pypi.org) are used for all Python versions, and they keep old versions of packages around. If everything works as it should (which, to be fair, it might not :) ), pip running on Python 2 ought to find the latest Python 2-compatible version of packages, including the latest Python 2-compatible version if itself if you ask it to upgrade itself. It's theoretically possible that the API used could change in a way that old versions of pip can't handle, but a) the API is super simple and there isn't a strong reason to do this and b) doing that would break the ability of old versions of pip to upgrade themselves - that is, for released versions of Python with bundled pip to work - so they're very unlikely to break the existing interface, even if they add a new one. Still, since PyPI is a free service with no support contracts, and especially because packages hosted on PyPI are uploaded by the individual volunteer authors who have the ability to delete old versions of their own packages, businesses who depend on Python 2 would be well-advised to download/mirror what they need locally to ensure continuity of business.
- zzzeek 6y agoThey can, the people here acting like pip is banned from python 2 don't seem to understand much about python or software.
- ianhanschen 6y agoedit: wrongness
- dragonwriter 6y ago> New deployments will break once pip is updated. No, they won't. > The error here is you think the people doing this even have programmers to port to 3.x or admins with the wherewithal to make sure an older version of pip is used. What wherewithal does that take? PyPI will just provide the last version of pip that supports Python 2. It takes no extra effort to not install a Python 3 version of pip on Python 2. > Nobody wants to keep Python 2.x in use or force the Pip maintainers to keep 2.x support. I'm sure there are people who do want to do the former. And they can, but it has no bearing on the latter.
- ianhanschen 6y agoWhy won’t new deployments break? If they are using ‘pip’ to install 2.x libraries, my understanding is it will now fail.
- deleted 6y ago[deleted]
- dragonwriter 6y ago> Why won’t new deployments break? Because the bundled pip with Python 2 is py2 compatible, and upgrading it from pyPI will get the last version that supports py2. If you are using distro packages, no distro that packages py2 is going to package anything but a py2-compatible pip tied to it. All this means is that there will be no new versions of pip for py2.
- bobsmooth 6y agoBetter question, why can't people update their scripts to python 3? Is it that much of a chore? Genuine question, I've only ever used 3.
- kortex 6y agoI've found 3 broad classes of code bases when migrating: 1. Trivial or easy. Probably started using best 2/3 compatibility practices easily on, or the nature of the code lends itself to 2to3. 2. Not able to switch without effort, but able to be slowly ported to 2/3 with six and the like. 3. Hopelessly intractable. Either too much bad practices in string handling, or tied to a legacy system. No way to port it without risking subtle bugs. Usually this is due to playing fast and loose with string types, even though we have known better since well before python 3.
- Izkata 6y agoHell, several of our projects are stuck on pip 9 because our requirements files have dependency conflicts that 10+ choke on, but 9 installs the right combination of.