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

Update min python version from 3.6 to 3.8 #23417

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 15, 2025

The reason for picking 3.8 here is that it provides all the features we currently have need of, and it available in the places we care about:

  • debian/stable (bookworm): 3.11
  • ubuntu/LTS (focal): 3.8
  • emsdk: 3.9.2

The motivation for this change is twofold:

  1. We get access to a few more python features.
  2. We actually test using the version we claim to support (3.8 on ubuntu/focal in CI). Currently the claim that we support 3.6 could well be a lie. We don't do any testing on 3.6 do who knows if incompatibilities have snuck in.

Replaces: #23378
Fixes: #23387

@sbc100 sbc100 requested review from dschuff and kripken January 15, 2025 17:43
@sbc100 sbc100 force-pushed the update_python branch 2 times, most recently from 149e10e to 77ffc22 Compare January 15, 2025 18:14
@sbc100 sbc100 changed the title Update min python version to 3.9 Update min python version to 3.8 Jan 15, 2025
@sbc100 sbc100 changed the title Update min python version to 3.8 Update min python version from 3.6 to 3.8 Jan 15, 2025
@kripken
Copy link
Member

kripken commented Jan 15, 2025

What is the advantage of this?

@dschuff
Copy link
Member

dschuff commented Jan 15, 2025

Another relevant place would still be MacOS, right? It doesn't include a Python on the system anymore but XCode command line tools (which I would expect many/most of our developers to have) includes python 3.9.6. So that would probably be ok for this too. I would also be curious to know what new things we want in Python 3.8 that aren't in 3.6.

@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 15, 2025

Another relevant place would still be MacOS, right? It doesn't include a Python on the system anymore but XCode command line tools (which I would expect many/most of our developers to have) includes python 3.9.6. So that would probably be ok for this too.

Does install Xcode put that python on the PATH? In any case that works for this change. I'm also generally less concerned about macOS since we include our own copy of python in emsdk for macOS.

I would also be curious to know what new things we want in Python 3.8 that aren't in 3.6.

Aside from the two small changes you see in this PR, not much I guess.

@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 15, 2025

What is the advantage of this?

Nothing major, just add a few more features we can use.

One problem we have today is that we don't actually test on 3.6 or 3.7 so stating that we support 3.6 could be a lie. Maybe better to set the minimum to something we actually test against?

@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 15, 2025

I added some rationale to the PR description. I'm also happy to just delay this until we have some better reasons..

@dschuff
Copy link
Member

dschuff commented Jan 15, 2025

Does install Xcode put that python on the PATH? In any case that works for this change. I'm also generally less concerned about macOS since we include our own copy of python in emsdk for macOS.

Yes, it's in /usr/bin/python3 for me.

@kripken
Copy link
Member

kripken commented Jan 15, 2025

If the python features are worth it then I'm ok with this change. They do seem nice, if minor. What I don't have is a good idea of the risk of existing users having 3.6 installed, say in various linux distros. Do you?

@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 15, 2025

If the python features are worth it then I'm ok with this change. They do seem nice, if minor. What I don't have is a good idea of the risk of existing users having 3.6 installed, say in various linux distros. Do you?

Not really, I only looked at ubuntu and debian.

Perhaps I'll reach on the mailing list.

The reason for picking 3.8 here is that it provides all the features
we currently have need of, and it available in the places we care about:

- debian/stable (bookworm): 3.11
- ubuntu/LTS (focal): 3.8
- emsdk: 3.9.2

Replaces: emscripten-core#23378
Fixes: emscripten-core#23387
@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 22, 2025

I'm not sure how to generate a list of all python version from all distros, but I think using ubuntu/LTS and debian/stable as a baseline is probably good signal. Also, it should be noted that python3.8 itself (our new shiny version) is already EOL upstream: https://devguide.python.org/versions/

@dschuff
Copy link
Member

dschuff commented Jan 22, 2025

RHEL appears to support several python versions; 3.6 is the default but 8-12 seem to be available.

@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 22, 2025

Interesting I googled RHEL 8 and got "In RHEL 8, Python 3.6 is the default, fully supported version of Python". I don't know if RHEL 8 is the current version though? Or if its used by the machines that ppl use to run emcc on?

@dschuff
Copy link
Member

dschuff commented Jan 22, 2025

No idea about the latter question, I just know RHEL is a popular distribution for enterprises.
8 and 9 are currently supported (https://access.redhat.com/articles/3078) there's a 10 year support window, and I don't think we want to pin emscripten to a 10 year old version of Python; so in this case (see the link in my last post) there does seem to be packages of newer versions available in the distro, so that seems like it should be sufficient if a user can ensure that Emscripten is run with e.g. python38 rather than python3.

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

Successfully merging this pull request may close these issues.

Should we bump the minimum python version?
3 participants