-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Remove support for python2 #7198
Comments
A typical thing to do in such cases could be to make a release and in the release notes indicate that in the following version support for e.g. Python 2.7 will be dropped and only Python >3.5 (or a version to be determined) will be supported. That would leave more time for users feedback. Though I'm not sure if this would be compatible with the way releases work in emscripten.. Another possibility could be to send an email to the mailing list (or some other channel used for announcements) to see if there is much opposition, before actually implementing it. (Personally, I'm all for Py3 only). |
I agree with the Python porting best practices that it is better to have a single codebase that supports both Python 2 and Python 3 at least for a little while to support A/B testing on a single codebase. https://docs.python.org/3/howto/pyporting.html |
We've been supporting both python2 and python3 several years now. Presumably that is long enough to qualify as "a little while"? |
Surprising because these are all syntax errors in Python 3 found and fixed in the last month. |
flake8 testing of https://github.com/emscripten-core/emscripten on Python 3.7.1 $ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
That is confusing. We do all our testing on python3 using the version that is present in ubuntu bionic so we do know tat least the the tests all pass. The async issue is particularly strange since one would expect that to show up every time Anyway, we might be flake8 clean in python3 but we have been running all our tests under it for a long time. |
Maintaining Python 2 support seems mainly important for libraries (rather than executable scripts) that may need to integrate with code that only runs under Python 2. Is that an important use case for anything in Emscripten? Though personally I think it's about time for libraries to drop Python 2 support as well, given it will no longer be maintained in a few months:
|
I am a MASSIVE fan of dropping support for legacy Python. However I would like to get all the Python 3 syntax errors cleared in a codebase that can be A/B tested before we drop support for Python 2. Just give me a pull request or two to finish the work. |
Looks like bionic includes python3.6 (https://packages.ubuntu.com/bionic/python3) but the async keyword was added in python3.7 which was released just one month ago. I'm not in super hurry to make this change. For sure we want to be flake8 clean first. Happy to wait for your PRs. |
Now I see #9209... That is super exciting. Let's allow that to land and let the paint dry for a few weeks before pulling the plug on legacy Python. It fixes the async keyword. Python 3.7 shipped more than a year ago according to https://devguide.python.org/#branchstatus It was 3.7__.4__ that was recently released. Python 3.8 is in late beta and is due in two months. |
Update: I've updated the emscripten-releases build infrastructure to be ready for python3 but haven't thrown the switch yet. Probably makes sense do that whenever we have a concrete plan to stop support for python2. |
Why not flip the switch for emscripten-releases now? Hopefully most users are on python3, so it may be better testing. |
Emscripten CI runs python3 IIRC so we have coverage of that already, right?
Also I'm using python3 locally for the infra code too, so I'm not too worried
about it.
|
42 days until Python 2 end of life. |
Congratulations! Search · python2 |
I'd very much like to remove python2 support in emscripten. After talking to people, some things that may block that:
|
emsdk fix for windows is here: emscripten-core/emsdk#349 |
This is one step towards using python3 by default everywhere. Notably: - python2 is still fully supported at this point - The top level scripts such as `emcc` as opposed to `emcc.py` are still run under just "python" so will work with whatever the system default is. This is because we still want to run on the default OSX install which doesn't python3 installed (and probably never will). Also: - switch circleci testing on linux to python2 - Update some docs that refer to python2 See #7198
This is one step towards using python3 by default everywhere. Notably: - python2 is still fully supported at this point - The top level scripts such as `emcc` as opposed to `emcc.py` are still run under just "python" so will work with whatever the system default is. This is because we still want to run on the default OSX install which doesn't python3 installed (and probably never will). Also: - switch circleci testing on linux to python2 - Update some docs that refer to python2 See #7198
This is one step towards using python3 by default everywhere. Notably: - python2 is still fully supported at this point - The top level scripts such as `emcc` as opposed to `emcc.py` are still run under just "python" so will work with whatever the system default is. This is because we still want to run on the default OSX install which doesn't python3 installed (and probably never will). Also: - switch circleci testing on linux to python3 - Update some docs that refer to python3 See #7198
Is the only blocker here to start bundling python on MacOS? |
I'm not sure. I think recent version of macOS might even ship python3. In any case I'm not sure bundling is the right way to go. Most mac developers would probably prefer to simply But yes, I think its only macOS we need to worry about at this time. Maybe we can do this in stages:
|
Hmm.. seems like a reasonable approach. We can probably assume that emscripten developers are OK installing dev tools from apple? So for macOS catalina I think we are good with just assuming we can use the result of That just leaves what to do about older versions of macOS. Do you think its reasonable to ask people to setup @juj, I remember last time we tried to make this move you were concerned about no longer being able to use the python 2 that ships as |
I was using ubuntu:eoan in a Docker container. Say, isn't Java dead too? Maybe we could get rid of that dependency. 😛 |
If you run |
Sorry. This is occurring within
I'm not against installing python3. Building Binaryen requires it also. |
Please submit a PR to change the documentation because Python 2 is dead. |
We still support python2 for now. The reason is that we want to run out-of-the-box on macOS which has system python2 but not python3. |
We are working on fully removing python2 support as soon as we can figure out a way to bundle python3 on macOS as part of emsdk. |
If you run "./embuilder" it will pick the correct version of python2. It looks like you can change your docker file to just drop the |
Once emscripten-core/emsdk#561 lands I think we can start the process of removing python2. @juj will you be able to use the bundled version of python macOS relatively easily? |
I was thinking it would be convenient to hitch the python2 removal the fastcomp removal (#11319) meaning that emscripten starting with version 2.0.0 will require python3. |
What would the benefit be to bundling them together? I guess it might feel nicer to use all modern stuff in 2.0.0, and I can't think of a real risk to doing both at once (it's not like we'll bisect on these things). |
Given that Python 2 has been dead for 218 days, let’s just drop that now and wait on fastcomp. |
Yes, I think I just like the idea of 2.0.0 being the clean slate release. Fastcomp removal is basically happening now (ish) .. so no need to wait :) |
In prep for emscripten 2.0.0 require drop support for python2 Fixes: #7198
In prep for emscripten 2.0.0 require drop support for python2 Fixes: #7198
In prep for emscripten 2.0.0 require drop support for python2 Fixes: #7198
In prep for emscripten 2.0.0 require drop support for python2 Fixes: #7198
We have been error'ing out python3 usage for a while now. This change finally removes the python2 support so there is no way back. And to show we mean it, include an f-string in there for good measure. Fixes: #7198
We have been error'ing out python3 usage for a while now. This change finally removes the python2 support so there is no way back. And to show we mean it, include an f-string in there for good measure. Fixes: #7198
We have a fair bit of complexity in the code in order to maintain python2 and python3 support at the same time. It also doubles our testing requirments (in fact we don't test both but in theory we should).
It would be great to drop support for one or the other and python2 seems like the logical choice.
Do we have any users who can't install python3 in order to use the toolchain?
The text was updated successfully, but these errors were encountered: