Skip to content

Conversation

@richardlau
Copy link
Member

@richardlau richardlau commented Nov 14, 2025

Original commit message:

[py3.12] Optimize some py files

1. Remove the imp module and use its equivalent instead
2. Delete unused module imports

Bug: chromium:1487454
Change-Id: I06fd342ba8e17f96ee2e55926cca0efded845b2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4983809
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ho Cheung <uioptt24@gmail.com>
Cr-Commit-Position: refs/heads/main@{#90641}

Refs: v8/v8@a0d0d4f


cc @nodejs/releasers This fixes Python 3.12 compatibility for the V8 CI with Node.js v20.x(-staging). The change is already present in v22.x-staging. It only touches the V8 test runner so has no effect on Node.js itself.

e.g. failure without this cherry-pick:
https://ci.nodejs.org/job/node-test-commit-v8-linux/6855/nodes=rhel8-s390x,v8test=v8test/console

12:48:09 export PATH="/home/iojs/build-tools:/opt/rh/gcc-toolset-10/root/usr/bin:/home/iojs/build/workspace/node-test-commit-v8-linux/depot_tools:/home/iojs/venv/bin:/home/iojs/nghttp2/src:/home/iojs/wrk:/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" && \
12:48:09 	/usr/bin/python3.12 deps/v8/tools/run-tests.py --gn --arch=s390x --progress=dots --timeout=120 intl \
12:48:09 			mjsunit cctest debugger inspector message preparser \
12:48:09 			--json-test-results /home/iojs/build/workspace/node-test-commit-v8-linux/v8-tap.json --slow-tests-cutoff 1000000
12:48:09 Traceback (most recent call last):
12:48:09   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/run-tests.py", line 11, in <module>
12:48:09     from testrunner import standard_runner
12:48:09   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/standard_runner.py", line 23, in <module>
12:48:09     import testrunner.base_runner as base_runner
12:48:09   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/base_runner.py", line 19, in <module>
12:48:09     from testrunner.local import testsuite
12:48:09   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 29, in <module>
12:48:09     import imp
12:48:09 ModuleNotFoundError: No module named 'imp'
12:48:09 make: *** [Makefile:715: test-v8] Error 1
12:48:09 Build step 'Execute shell' marked build as failure

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@richardlau richardlau changed the title deps: V8: cherry-pick a0d0d4fc4f19 [v20.x] deps: V8: cherry-pick a0d0d4fc4f19 Nov 14, 2025
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v20.x Issues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Nov 14, 2025
@richardlau richardlau marked this pull request as draft November 14, 2025 16:23
@richardlau

This comment was marked as outdated.

Original commit message:

    [py3.12] Optimize some py files

    1. Remove the imp module and use its equivalent instead
    2. Delete unused module imports

    Bug: chromium:1487454
    Change-Id: I06fd342ba8e17f96ee2e55926cca0efded845b2a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4983809
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Commit-Queue: Ho Cheung <uioptt24@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#90641}

Refs: v8/v8@a0d0d4f
@richardlau
Copy link
Member Author

With the cherry-pick we run into this:

https://ci.nodejs.org/job/node-test-commit-v8-linux/6862/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/console

15:53:51 export PATH="/home/iojs/build/workspace/node-test-commit-v8-linux/depot_tools:/home/iojs/venv/bin:/home/iojs/nghttp2/src:/home/iojs/wrk:/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" && \
15:53:51 	/usr/bin/python3.10 deps/v8/tools/run-tests.py --gn --arch=x64 --progress=dots --timeout=120 intl \
15:53:51 			mjsunit cctest debugger inspector message preparser \
15:53:51 			--json-test-results /home/iojs/build/workspace/node-test-commit-v8-linux/v8-tap.json --slow-tests-cutoff 1000000
15:53:51 Traceback (most recent call last):
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/base_runner.py", line 173, in execute
15:53:51     tests = self._load_testsuite_generators(ctx, names)
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/base_runner.py", line 534, in _load_testsuite_generators
15:53:51     tests = suite.load_tests_from_disk(variables)
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 293, in load_tests_from_disk
15:53:51     test_count = self.__calculate_test_count()
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 286, in __calculate_test_count
15:53:51     self.__initialize_test_count_estimation()
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 283, in __initialize_test_count_estimation
15:53:51     next(iter(self.ListTests()), None)
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 127, in list_tests
15:53:51     case = self._create_test(testname, self.suite)
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 117, in _create_test
15:53:51     return self.test_class(suite, path, self._path_to_name(path), **kwargs)
15:53:51   File "/home/iojs/build/workspace/node-test-commit-v8-linux/deps/v8/tools/testrunner/local/testsuite.py", line 110, in _path_to_name
15:53:51     if utils.IsWindows():
15:53:51 NameError: name 'utils' is not defined

Upstream, that reference was removed by v8/v8@e3b750c, but git node v8 backport fails to cherry-pick that cleanly and it seems much simpler to not remove

from . import utils

from the original commit.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau marked this pull request as ready for review November 14, 2025 17:19
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 16, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 16, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@richardlau
Copy link
Member Author

@marco-ippolito when this lands on v20.x-staging this will need the embedder string in common.gypi to be adjusted as #59662 has bumped it up in the meantime.

marco-ippolito pushed a commit that referenced this pull request Nov 19, 2025
Original commit message:

    [py3.12] Optimize some py files

    1. Remove the imp module and use its equivalent instead
    2. Delete unused module imports

    Bug: chromium:1487454
    Change-Id: I06fd342ba8e17f96ee2e55926cca0efded845b2a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4983809
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Commit-Queue: Ho Cheung <uioptt24@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#90641}

Refs: v8/v8@a0d0d4f
PR-URL: #60716
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@marco-ippolito
Copy link
Member

Landed in a898c9c

@richardlau richardlau deleted the v20.x-v8ci branch November 19, 2025 15:20
marco-ippolito pushed a commit that referenced this pull request Nov 19, 2025
Original commit message:

    [py3.12] Optimize some py files

    1. Remove the imp module and use its equivalent instead
    2. Delete unused module imports

    Bug: chromium:1487454
    Change-Id: I06fd342ba8e17f96ee2e55926cca0efded845b2a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4983809
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Commit-Queue: Ho Cheung <uioptt24@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#90641}

Refs: v8/v8@a0d0d4f
PR-URL: #60716
Reviewed-By: Michaël Zasso <targos@protonmail.com>
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. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v20.x Issues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants