Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 576242f

Browse filesBrowse files
gz83marco-ippolito
authored andcommitted
deps: V8: cherry-pick a0d0d4fc4f19
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>
1 parent bb10819 commit 576242f
Copy full SHA for 576242f

File tree

Expand file treeCollapse file tree

3 files changed

+11
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+11
-13
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.32',
39+
'v8_embedder_string': '-node.33',
4040

4141
##### V8 defaults for Node.js #####
4242

Collapse file

‎deps/v8/test/test262/testcfg.py‎

Copy file name to clipboardExpand all lines: deps/v8/test/test262/testcfg.py
+6-9Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@
2525
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
import imp
29-
import itertools
30-
import os
31-
import re
28+
import importlib.machinery
3229
import sys
3330

3431
from testrunner.local import statusfile
3532
from testrunner.local import testsuite
36-
from testrunner.local import utils
3733
from testrunner.objects import testcase
3834
from testrunner.outproc import base as outproc
3935
from testrunner.outproc import test262
@@ -141,11 +137,12 @@ def _load_parse_test_record(self):
141137
root = os.path.join(*TEST_262_TOOLS_ABS_PATH)
142138
f = None
143139
try:
144-
(f, pathname, description) = imp.find_module("parseTestRecord", [root])
145-
module = imp.load_module("parseTestRecord", f, pathname, description)
140+
loader = importlib.machinery.SourceFileLoader(
141+
"parseTestRecord", f"{root}/parseTestRecord.py")
142+
module = loader.load_module()
146143
return module.parseTestRecord
147-
except:
148-
print('Cannot load parseTestRecord')
144+
except Exception as e:
145+
print(f'Cannot load parseTestRecord: {e}')
149146
raise
150147
finally:
151148
if f:
Collapse file

‎deps/v8/tools/testrunner/local/testsuite.py‎

Copy file name to clipboardExpand all lines: deps/v8/tools/testrunner/local/testsuite.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828

29-
import imp
29+
import importlib.machinery
3030
import itertools
3131
import os
3232
from contextlib import contextmanager
@@ -238,12 +238,13 @@ def merge(self, test_generator):
238238
def _load_testsuite_module(name, root):
239239
f = None
240240
try:
241-
(f, pathname, description) = imp.find_module("testcfg", [root])
242-
yield imp.load_module(name + "_testcfg", f, pathname, description)
241+
yield importlib.machinery.SourceFileLoader(
242+
name + "_testcfg", f"{root}/testcfg.py").load_module()
243243
finally:
244244
if f:
245245
f.close()
246246

247+
247248
class TestSuite(object):
248249
@staticmethod
249250
def Load(ctx, root, test_config):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.