Skip to content

Commit 2314319

Browse files
committed
[GR-21590] Update imports
PullRequest: graalpython/4084
2 parents 937fcd9 + 759caa5 commit 2314319

File tree

404 files changed

+31977
-31932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404 files changed

+31977
-31932
lines changed

ci.jsonnet

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,13 @@
113113
"windows:amd64:jdk21" : daily + t("01:30:00") + provide(GPY_JVM21_STANDALONE),
114114
"linux:amd64:jdk-latest" : tier2 + require(GPY_JVM_STANDALONE),
115115
"linux:aarch64:jdk-latest" : tier3 + provide(GPY_JVM_STANDALONE),
116-
"darwin:amd64:jdk-latest" : daily + t("01:30:00") + daily + provide(GPY_JVM_STANDALONE),
117116
"darwin:aarch64:jdk-latest" : tier3 + provide(GPY_JVM_STANDALONE),
118117
"windows:amd64:jdk-latest" : tier3 + provide(GPY_JVM_STANDALONE),
119118
}),
120119
"python-unittest-bytecode-dsl": gpgate + platform_spec(no_jobs) + bytecode_dsl_gate("python-unittest") + platform_spec({
121-
"linux:amd64:jdk21" : daily + t("01:00:00"),
122-
"linux:aarch64:jdk21" : daily + t("01:00:00"),
123-
"darwin:aarch64:jdk21" : daily + t("01:00:00"),
120+
"linux:amd64:jdk-latest" : daily + t("01:00:00"),
121+
"linux:aarch64:jdk-latest" : daily + t("01:00:00"),
122+
"darwin:aarch64:jdk-latest" : daily + t("01:00:00"),
124123
}),
125124
"python-unittest-multi-context": gpgate + platform_spec(no_jobs) + platform_spec({
126125
"linux:amd64:jdk21" : daily + t("01:00:00") + require(GPY_JVM21_STANDALONE),
@@ -129,7 +128,6 @@
129128
"windows:amd64:jdk21" : daily + t("02:00:00"),
130129
"linux:amd64:jdk-latest" : tier2 + require(GPY_JVM_STANDALONE),
131130
"linux:aarch64:jdk-latest" : daily + t("01:30:00") + require(GPY_JVM_STANDALONE),
132-
"darwin:amd64:jdk-latest" : daily + t("01:00:00") + require(GPY_JVM_STANDALONE),
133131
"darwin:aarch64:jdk-latest" : daily + t("01:00:00") + require(GPY_JVM_STANDALONE),
134132
"windows:amd64:jdk-latest" : daily + t("01:30:00"),
135133
}),
@@ -139,7 +137,6 @@
139137
"darwin:aarch64:jdk21" : daily + t("00:30:00") + require(GPY_JVM21_STANDALONE),
140138
"linux:amd64:jdk-latest" : tier2 + require(GPY_JVM_STANDALONE),
141139
"linux:aarch64:jdk-latest" : daily + t("00:30:00") + require(GPY_JVM_STANDALONE),
142-
"darwin:amd64:jdk-latest" : daily + t("00:30:00") + require(GPY_JVM_STANDALONE),
143140
"darwin:aarch64:jdk-latest" : daily + t("00:30:00") + require(GPY_JVM_STANDALONE),
144141
}),
145142
"python-unittest-hpy": gpgate + require(GPY_NATIVE_STANDALONE) + platform_spec(no_jobs) + platform_spec({
@@ -151,14 +148,12 @@
151148
"python-unittest-posix": gpgate + platform_spec(no_jobs) + platform_spec({
152149
"linux:amd64:jdk-latest" : tier2 + require(GPY_JVM_STANDALONE),
153150
"linux:aarch64:jdk-latest" : tier3 + require(GPY_JVM_STANDALONE),
154-
"darwin:amd64:jdk-latest" : daily + t("01:30:00") + require(GPY_JVM_STANDALONE),
155151
"darwin:aarch64:jdk-latest" : tier3 + require(GPY_JVM_STANDALONE),
156152
}),
157153
"python-unittest-standalone": gpgate_maven + platform_spec(no_jobs) + platform_spec({
158154
"linux:amd64:jdk21" : daily + t("02:00:00") + require(GPY_JVM21_STANDALONE),
159155
"linux:aarch64:jdk21" : daily + t("02:00:00") + require(GPY_JVM21_STANDALONE),
160156
"darwin:aarch64:jdk21" : daily + t("02:00:00") + require(GPY_JVM21_STANDALONE),
161-
"darwin:amd64:jdk-latest" : daily + t("02:00:00") + require(GPY_JVM_STANDALONE) + require(GRAAL_JDK_LATEST),
162157
"windows:amd64:jdk21" : daily + t("02:00:00") + require(GPY_JVM21_STANDALONE) + batches(2),
163158
"linux:amd64:jdk-latest" : tier3 + require(GPY_JVM_STANDALONE) + require(GRAAL_JDK_LATEST),
164159
"linux:aarch64:jdk-latest" : tier3 + require(GPY_JVM_STANDALONE) + require(GRAAL_JDK_LATEST),
@@ -172,12 +167,11 @@
172167
"windows:amd64:jdk21" : daily + t("01:00:00"),
173168
"linux:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
174169
"linux:aarch64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
175-
"darwin:amd64:jdk-latest" : daily + t("01:30:00"),
176170
"darwin:aarch64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
177171
"windows:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
178172
}),
179173
"python-junit-bytecode-dsl": gpgate + platform_spec(no_jobs) + bytecode_dsl_gate("python-junit") + platform_spec({
180-
"linux:amd64:jdk21" : tier3 + require(GRAAL_JDK_LATEST),
174+
"linux:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
181175
}),
182176
"python-junit-maven": gpgate_maven + platform_spec(no_jobs) + platform_spec({
183177
"linux:amd64:jdk21" : daily + t("00:30:00"),
@@ -186,7 +180,6 @@
186180
"windows:amd64:jdk21" : daily + t("01:30:00"),
187181
"linux:amd64:jdk-latest" : tier3 + provide(GRAAL_JDK_LATEST),
188182
"linux:aarch64:jdk-latest" : tier3 + provide(GRAAL_JDK_LATEST),
189-
"darwin:amd64:jdk-latest" : daily + t("01:30:00") + provide(GRAAL_JDK_LATEST),
190183
"darwin:aarch64:jdk-latest" : tier3 + provide(GRAAL_JDK_LATEST),
191184
"windows:amd64:jdk-latest" : tier3 + provide(GRAAL_JDK_LATEST),
192185
}),
@@ -223,7 +216,6 @@
223216
"python-svm-unittest": gpgate + platform_spec(no_jobs) + platform_spec({
224217
"linux:amd64:jdk-latest" : tier2 + require(GPY_NATIVE_STANDALONE),
225218
"linux:aarch64:jdk-latest" : tier3 + require(GPY_NATIVE_STANDALONE),
226-
"darwin:amd64:jdk-latest" : daily + t("01:30:00") + provide(GPY_NATIVE_STANDALONE),
227219
"darwin:aarch64:jdk-latest" : tier3 + require(GPY_NATIVE_STANDALONE),
228220
"windows:amd64:jdk-latest" : tier3 + require(GPY_NATIVE_STANDALONE) + batches(2),
229221
}),
@@ -233,7 +225,6 @@
233225
"python-tagged-unittest": gpgate + require(GPY_NATIVE_STANDALONE) + batches(TAGGED_UNITTESTS_SPLIT) + platform_spec(no_jobs) + platform_spec({
234226
"linux:amd64:jdk-latest" : tier2,
235227
"linux:aarch64:jdk-latest" : tier3,
236-
"darwin:amd64:jdk-latest" : daily + t("02:00:00"),
237228
"darwin:aarch64:jdk-latest" : tier3,
238229
"windows:amd64:jdk-latest" : daily + t("02:00:00"),
239230
}),
@@ -243,7 +234,6 @@
243234
"python-graalvm": gpgate + platform_spec(no_jobs) + platform_spec({
244235
"linux:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
245236
"linux:aarch64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
246-
"darwin:amd64:jdk-latest" : daily + t("01:00:00") + daily,
247237
"darwin:aarch64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
248238
"windows:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
249239
}),
@@ -363,7 +353,7 @@
363353
} + {
364354
[bench + "-bytecode-dsl"]: bench_task(bench) + bytecode_dsl_bench + platform_spec(no_jobs) + bench_variants({
365355
"vm_name:graalvm_ee_default_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : daily + t("04:00:00")},
366-
"vm_name:graalpython_enterprise_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : daily + t("04:00:00")},
356+
"vm_name:graalpython_enterprise_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : weekly + t("04:00:00")},
367357
}),
368358
for bench in ["micro_small", "meso_small"]
369359
} + {

ci/graal/ci/ci_common/common.jsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ common + common.frequencies + {
140140
linux_amd64_ubuntu: common.linux_amd64_ubuntu + graal_common_extras,
141141
linux_aarch64: common.linux_aarch64 + graal_common_extras + linux_deps_extras,
142142
linux_aarch64_ol9: common.linux_aarch64_ol9 + graal_common_extras + linux_deps_extras,
143-
darwin_amd64: common.darwin_amd64 + graal_common_extras,
144143
darwin_aarch64: common.darwin_aarch64 + graal_common_extras,
145144
windows_amd64: common.windows_amd64 + graal_common_extras,
146145
windows_server_2016_amd64: common.windows_server_2016_amd64 + graal_common_extras,

ci/graal/ci/common.jsonnet

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ local common_json = import "../common.json";
363363
pcre2: '==10.37',
364364
gnur: '==4.0.3-gcc4.8.5-pcre2',
365365
} + if (std.objectHasAll(self, 'os_distro') && self['os_distro'] == 'ol' && std.objectHasAll(self, 'os_distro_version') && self['os_distro_version'] == '9') then {curl: '==7.78.0'} else {curl: '==7.50.1'}
366-
else if (self.os == "darwin" && self.arch == "amd64") then {
367-
'pcre2': '==10.37',
368-
} else {},
366+
else {},
369367
environment+:
370368
if (self.os == "linux" && self.arch == "amd64") then {
371369
TZDIR: '/usr/share/zoneinfo',
@@ -376,25 +374,14 @@ local common_json = import "../common.json";
376374
GNUR_HOME_BINARY: '/cm/shared/apps/gnur/4.0.3_gcc4.8.5_pcre2-10.37/R-4.0.3',
377375
FASTR_RELEASE: 'true',
378376
}
379-
else if (self.os == "darwin" && self.arch == "amd64") then {
380-
FASTR_FC: '/cm/shared/apps/gcc/8.3.0/bin/gfortran',
381-
FASTR_CC: '/cm/shared/apps/gcc/8.3.0/bin/gcc',
382-
TZDIR: '/usr/share/zoneinfo',
383-
PKG_INCLUDE_FLAGS_OVERRIDE : '-I/cm/shared/apps/pcre2/pcre2-10.37/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/curl/7.50.1/include',
384-
PKG_LDFLAGS_OVERRIDE : '-L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre2/pcre2-10.37/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/10.2.0/lib -L/usr/lib',
385-
FASTR_RELEASE: 'true',
386-
} else {},
377+
else {},
387378
downloads+:
388379
if (self.os == "linux" && self.arch == "amd64") then {
389380
BLAS_LAPACK_DIR: { name: 'fastr-403-blas-lapack-gcc', version: '4.8.5', platformspecific: true },
390381
F2C_BINARY: { name: 'f2c-binary', version: '7', platformspecific: true },
391382
FASTR_RECOMMENDED_BINARY: { name: 'fastr-recommended-pkgs', version: '16', platformspecific: true },
392383
}
393-
else if (self.os == "darwin" && self.arch == "amd64") then {
394-
BLAS_LAPACK_DIR: { name: "fastr-403-blas-lapack-gcc", version: "8.3.0", platformspecific: true },
395-
F2C_BINARY: { name: 'f2c-binary', version: '7', platformspecific: true },
396-
FASTR_RECOMMENDED_BINARY: { name: 'fastr-recommended-pkgs', version: '16', platformspecific: true },
397-
} else {},
384+
else {},
398385
catch_files+: if (self.os != "windows" && self.arch == "amd64") then [
399386
'GNUR_CONFIG_LOG = (?P<filename>.+\\.log)',
400387
'GNUR_MAKE_LOG = (?P<filename>.+\\.log)',
@@ -550,7 +537,6 @@ local common_json = import "../common.json";
550537

551538
linux_amd64_ubuntu: linux + amd64 + ubuntu22 + { os_distro:: "ubuntu", os_distro_version:: "22" },
552539

553-
darwin_amd64: darwin + amd64,
554540
darwin_aarch64: darwin + aarch64,
555541

556542
windows_amd64: windows + amd64,
@@ -581,7 +567,6 @@ local common_json = import "../common.json";
581567

582568
linux_amd64_ubuntu: self.bare.linux_amd64_ubuntu + common,
583569

584-
darwin_amd64: self.bare.darwin_amd64 + common,
585570
darwin_aarch64: self.bare.darwin_aarch64 + common,
586571

587572
windows_amd64: self.bare.windows_amd64 + common,

ci/graal/common.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "7.64.0",
7+
"mx_version": "7.64.2",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
@@ -45,16 +45,16 @@
4545

4646
"oraclejdk24": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24.0.1+9", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

48-
"oraclejdk25": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+37", "platformspecific": true, "extrabundles": ["static-libs"]},
48+
"oraclejdk25": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25.0.1+8", "platformspecific": true, "extrabundles": ["static-libs"]},
4949
"graalvm-ee-25-ea": {"name": "graalvm-jdk", "version": "25.0.0", "ea": "36", "platformspecific": true },
5050

51-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+37", "platformspecific": true, "extrabundles": ["static-libs"]},
52-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+37-jvmci-25.1-b07", "platformspecific": true },
53-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+37-jvmci-25.1-b07-debug", "platformspecific": true },
54-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+37-jvmci-25.1-b07-sulong", "platformspecific": true },
55-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+37-jvmci-25.1-b07", "platformspecific": true },
56-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+37-jvmci-25.1-b07-debug", "platformspecific": true },
57-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+37-jvmci-25.1-b07-sulong", "platformspecific": true }
51+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25.0.1+8", "platformspecific": true, "extrabundles": ["static-libs"]},
52+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25.0.1+8-jvmci-25.1-b08", "platformspecific": true },
53+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25.0.1+8-jvmci-25.1-b08-debug", "platformspecific": true },
54+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25.0.1+8-jvmci-25.1-b08-sulong", "platformspecific": true },
55+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25.0.1+8-jvmci-25.1-b08", "platformspecific": true },
56+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25.0.1+8-jvmci-25.1-b08-debug", "platformspecific": true },
57+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25.0.1+8-jvmci-25.1-b08-sulong", "platformspecific": true }
5858
},
5959

6060
"eclipse": {

graalpython/com.oracle.graal.python.test/src/runner.py

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def out_tell():
224224
T = typing.TypeVar('T')
225225

226226

227-
def partition_list(l: list[T], fn: typing.Callable[[T], bool]):
227+
def partition_list(l: list[T], fn: typing.Callable[[T], bool]) -> tuple[list[T], list[T]]:
228228
a = []
229229
b = []
230230
for item in l:
@@ -486,7 +486,7 @@ def generate_tags(self, append=False):
486486
def update_tags(test_file: 'TestFile', results: list[TestResult], tag_platform: str,
487487
untag_failed=False, untag_skipped=False, untag_missing=False):
488488
current = read_tags(test_file, allow_exclusions=True)
489-
exclusions, current = partition_list(current, lambda t: isinstance(t, TagExclusion))
489+
exclusions, current = partition_list(current, lambda t: t.is_exclusion)
490490
status_by_id = {r.test_id.normalized(): r.status for r in results}
491491
tag_by_id = {}
492492
for tag in current:
@@ -510,7 +510,15 @@ def update_tags(test_file: 'TestFile', results: list[TestResult], tag_platform:
510510
tag_by_id[test_id] = Tag.for_key(test_id, tag_platform)
511511

512512
for exclusion in exclusions:
513-
tag_by_id.pop(exclusion.test_id, None)
513+
if tag := tag_by_id.get(exclusion.test_id):
514+
if exclusion.keys:
515+
tag = tag.without_keys(exclusion.keys)
516+
else:
517+
tag = None
518+
if not tag:
519+
del tag_by_id[exclusion.test_id]
520+
else:
521+
tag_by_id[exclusion.test_id] = tag
514522

515523
tags = set(tag_by_id.values()) | set(exclusions)
516524
write_tags(test_file, tags)
@@ -1191,31 +1199,31 @@ def collect(all_specifiers: list[TestSpecifier], *, use_tags=False, ignore=None,
11911199
class Tag:
11921200
test_id: TestId
11931201
keys: frozenset[str]
1202+
is_exclusion: bool
1203+
comment: str | None = False
11941204

11951205
@classmethod
1196-
def for_key(cls, test_id, key):
1197-
return Tag(test_id, frozenset({key}))
1198-
1199-
def with_key(self, key: str):
1200-
return Tag(self.test_id, self.keys | {key})
1201-
1202-
def without_key(self, key: str):
1203-
if key not in self.keys:
1204-
return self
1205-
keys = self.keys - {key}
1206-
if keys:
1207-
return Tag(self.test_id, keys)
1206+
def for_key(cls, test_id, key) -> 'Tag':
1207+
return Tag(test_id, frozenset({key}), is_exclusion=False)
12081208

1209-
def __str__(self):
1210-
return f'{self.test_id.test_name} @ {",".join(sorted(self.keys))}'
1209+
def with_key(self, key: str) -> 'Tag':
1210+
return Tag(self.test_id, self.keys | {key}, is_exclusion=self.is_exclusion)
12111211

1212+
def without_key(self, key: str) -> 'Tag | None':
1213+
return self.without_keys({key})
12121214

1213-
@dataclass(frozen=True)
1214-
class TagExclusion(Tag):
1215-
comment: str | None
1215+
def without_keys(self, keys: set[str]) -> 'Tag | None':
1216+
keys = self.keys - keys
1217+
if keys:
1218+
if keys == self.keys:
1219+
return self
1220+
return Tag(self.test_id, keys, is_exclusion=self.is_exclusion)
12161221

12171222
def __str__(self):
1218-
s = f'!{self.test_id.test_name}'
1223+
s = ''
1224+
if self.is_exclusion:
1225+
s += '!'
1226+
s += self.test_id.test_name
12191227
if self.keys:
12201228
s += f' @ {",".join(sorted(self.keys))}'
12211229
if self.comment:
@@ -1241,21 +1249,21 @@ def read_tags(test_file: TestFile, allow_exclusions=False) -> list[Tag]:
12411249
test, _, keys = line.partition('@')
12421250
test = test.strip()
12431251
keys = keys.strip()
1252+
is_exclusion = False
12441253
if test.startswith('!'):
1245-
if allow_exclusions:
1246-
test = test.removeprefix('!')
1247-
tags.append(TagExclusion(
1248-
TestId(test_path, test),
1249-
frozenset(keys.split(',')) if keys else frozenset(),
1250-
comment,
1251-
))
1252-
else:
1253-
if not keys:
1254-
log(f'WARNING: invalid tag {test}: missing platform keys')
1255-
tags.append(Tag(
1256-
TestId(test_path, test),
1257-
frozenset(keys.split(',')),
1258-
))
1254+
is_exclusion = True
1255+
test = test.removeprefix('!')
1256+
1257+
if not keys and not is_exclusion:
1258+
log(f'WARNING: invalid tag {test}: missing platform keys')
1259+
tag = Tag(
1260+
TestId(test_path, test),
1261+
frozenset(keys.split(',') if keys else frozenset()),
1262+
is_exclusion=is_exclusion,
1263+
comment=comment,
1264+
)
1265+
if not is_exclusion or allow_exclusions:
1266+
tags.append(tag)
12591267
comment = None
12601268
return tags
12611269

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
test.test___all__.AllTest.test_all @ darwin-arm64,darwin-x86_64,linux-aarch64,linux-x86_64
1+
test.test___all__.AllTest.test_all @ darwin-arm64,linux-aarch64,linux-x86_64
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
test.test__locale._LocaleTests.test_float_parsing @ darwin-arm64,darwin-x86_64,linux-aarch64,linux-x86_64
2-
test.test__locale._LocaleTests.test_lc_numeric_localeconv @ darwin-arm64,darwin-x86_64,linux-aarch64,linux-x86_64
1+
test.test__locale._LocaleTests.test_float_parsing @ darwin-arm64,linux-aarch64,linux-x86_64
2+
test.test__locale._LocaleTests.test_lc_numeric_localeconv @ darwin-arm64,linux-aarch64,linux-x86_64

0 commit comments

Comments
 (0)