-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Should we drop legacy Python? #2093
Comments
I don't know .. it'd be interesting to know the state of Python 3 on the main platforms where Node.js is deployed. Is it universally installed by default now on those? Even CentOS 7 and Ubuntu 16.04? |
CentOS 7 ships with an unsafe 2.7.5 which should at a minimum be upgraded to Py2.7.9 for security reasons. Py3 upgrade is https://linuxize.com/post/how-to-install-python-3-on-centos-7 https://wiki.ubuntu.com/Python Ubuntu 16.04 comes with both Python 2.7 and Python 3.5 by default. |
Well, while we're breaking stuff for node-gyp 7 we could certainly bundle this in too. I think I'd defer to you on this choice if you think it's safe enough on common platforms. Anyone else? |
Random internet user here. MacOS still ships with Python 2.7.16. Removing support for Python 2 would require your users to first download and install Python3 in some manner. That would suck (IMHO). I would add that you should follow this guidance specifically, if you aren't already: https://docs.python.org/dev/howto/pyporting.html That is - aim for Python2/3 compatibility so it works on both:
Essentially, you can target Python 3 while making it (mostly) backwards compatible with Python 2.7. Anything older than 2.7 is ancient, hasn't been supported in many years, and should be avoided accordingly. I'd be very curious to see if any dependencies used in the project aren't already supported by Python3, which is likely the only major blocker you'll have in the process of converting to target py3. Futurize goes a very long way to getting to python3 support. The biggest consideration to completely dropping support of Python2 shouldn't necessarily be "is it still actively supported", but rather if the project needs to use features exclusive to Python3 - things like asyncio or dataclasses or any of the newer PEPs. Your users (like me) won't care if you use the latest python3 bells and whistles, but will definitely care if you break their applications and tooling on their current OS's which are still distributed with Python2 (again, like MacOS!) |
macOS Catalina ships with a |
I think this chart holds some answers: https://gs.statcounter.com/macos-version-market-share/desktop/worldwide Interestingly it doesn't look like Catalina adoption is slower than previous versions (anecdotally I would have thought it would be!). You also have to consider the target audience here: almost entirely developers, who are (a) more likely to have the latest of something (although my anecdotes come into play here because I know a lot of devs who still haven't adopted Catalina) and (b) quite capable and not too uncomfortable installing newer versions of dependencies when they're clearly made aware of the need. |
And a Python 3 compatibility "only" ? Did anyone already try to do that ? |
Yes. |
I would definitely drop Python 2 as well as old Node versions as mentioned in #1945. It's reasonable to think that those who don't want to upgrade their Python and Node distributions, won't upgrade node-gyp as well anyway |
Have we already remove support of python 2? If so, can this issue be closed? |
#2300 dropped support for Python 2. |
Python 2 is no longer supported by the Python Development Team. Should we drop it as well?
The text was updated successfully, but these errors were encountered: