-
Notifications
You must be signed in to change notification settings - Fork 29.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
build: relax upper limit on python version check #48136
base: main
Are you sure you want to change the base?
Conversation
We can't entirely remove the limit because we want to print a helpful message with python installs we found but we can at least relax it to a much wider range. Python 3.x is very likely compatible with 3.x-1 so don't be too uptight about what versions we accept, as long as it's python >= 3.6. Refs: nodejs#48130
Noting that when I suggested relaxing the version check (Giving the user information on how to override it if they wanted to do so at their own risk) it was rejected: #41051 So while I'd be in favour of this as an even more strong solution that what I proposed, there may be disagreement elsewhere ;-) |
@nodejs/python |
From my perspective, I would like us to use https://devguide.python.org/versions as our metric. If the Python Core Team supports a version of Python then we should also support it. Python 3.6 is EOL (since 2021) and Python 3.12 is currently If folks want to use EOL or pre-release versions of Python then we should provide minimal (not recommended) support. If folks are paying for long-term support for an OS that has an EOL version of Python then their OS provider can support them and we are no longer obliged to do so. If folks are using an OS that is beyond the standard support and are not paying for LTS, then their problems are not for us to solve. Building on secure platforms and being able to use new language optimizations and features helps both our safety and velocity. Python 3.11 is 25% faster than Python 3.10 and this optimization trend will continue in Py3.12 and then 3.13 annual releases. Supporting four versions of Python is sufficient. Let's encourage security and performance upgrades. |
if sys.version_info[:2] in acceptable_pythons: | ||
major, minor, patch = sys.version_info[:3] | ||
print('Node.js configure: Found Python {}.{}.{}...'.format(major, minor, patch)) | ||
if major > 3 or major == 3 and minor >= 6: |
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.
if major > 3 or major == 3 and minor >= 6: | |
if sys.version_info >= (3, 8): |
This just managed to hit a snag with Python 3.12 in Fedora Rawhide. distutils was removed, so https://peps.python.org/pep-0632/ Simply relaxing the check, while it works most of the time, it can cause issues when not tested. |
This needs a rebase. |
We can't entirely remove the limit because we want to print a helpful message with python installs we found but we can at least relax it to a much wider range.
Python 3.x is very likely compatible with 3.x-1 so don't be too uptight about what versions we accept, as long as it's python >= 3.6.
Refs: #48130