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

[v14.x] build: support Python 3.11 #45231

Closed
wants to merge 2 commits into from

Conversation

richardlau
Copy link
Member

Backport of #45191 to v14.x.

PR-URL: nodejs#45191
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: nodejs#45191
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 29, 2022
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. v14.x labels Oct 29, 2022
@richardlau richardlau mentioned this pull request Oct 29, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 29, 2022
@nodejs-github-bot
Copy link
Collaborator

@@ -240,7 +240,7 @@ test with Python 3.
* GNU Make 3.81 or newer
* Python (see note above)
* Python 2.7
* Python 3.5, 3.6, 3.7, 3.8, 3.9 or 3.10 (see note above)
* Python >=3.5 <=3.11 (see note above)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use f-strings and will not run on Python 3.5.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Node.js 14? I don't think we've backported anything using f-strings there. Node.js 14 is in maintenance and going End-of-Life in April 2023 -- this PR is needed to build Node.js 14 on systems that have update to Python 3.11.

@@ -240,7 +240,7 @@ test with Python 3.
* GNU Make 3.81 or newer
* Python (see note above)
* Python 2.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy Python?!?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Node.js 14, which goes End-of-Life in April 2023. We dropped legacy Python for Node.js 16 but 14 was the last release where we supported building with both legacy Python and Python 3 -- this PR merely allows the scripts to use Python 3.11.

configure Show resolved Hide resolved
@richardlau
Copy link
Member Author

It looks like the old version of node-gyp in the old version of npm doesn't work with Python 3.11 👀 😞

@richardlau
Copy link
Member Author

Given that Node.js 14 is in maintenance and it appears that Python 3.11 introduces incompatibilities with the older versions of node-gyp in npm in Node.js 14 it seems the least risky thing is to not add support for building with Python 3.11 for Node.js 14.

We'll need to figure out a way of pinning Python in our Windows CI hosts to Python 3.10 (at least for Node.js 14) to unbreak the CI for Node.js 14. cc @nodejs/platform-windows @nodejs/build-infra

lpinca
lpinca previously approved these changes Oct 29, 2022
@targos
Copy link
Member

targos commented Oct 30, 2022

FWIW on my Windows machine I installed Python from the Microsoft Store, where you can pin to a minor version number (the app is available multiple times, for example Python 3.10).

@cclauss
Copy link
Contributor

cclauss commented Oct 30, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants