Skip to content

Commit 12267ad

Browse files
committed
[GR-54154] Relax IO encoding check
PullRequest: mx/1797
2 parents f2d92b8 + 8351270 commit 12267ad

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

common.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
4646
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.3", "platformspecific": true },
4747

48-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+22", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+22-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+22-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+22-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+22-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+22-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+22-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+23", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+23-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+23-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+23-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+23-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+23-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+23-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

src/mx/_impl/mx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18173,7 +18173,7 @@ def alarm_handler(signum, frame):
1817318173
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))
1817418174

1817518175
# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
18176-
version = VersionSpec("7.25.4") # GR-54113
18176+
version = VersionSpec("7.25.5") # [GR-54154] Relax IO encoding check
1817718177

1817818178
_mx_start_datetime = datetime.utcnow()
1817918179

src/mx/_impl/support/logging.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,21 @@
6060

6161
def _check_stdout_encoding():
6262
# Importing here to avoid broken circular import
63+
from .envvars import env_var_to_bool
6364
from .system import is_continuous_integration
6465

66+
if not env_var_to_bool("MX_CHECK_IOENCODING", "1"):
67+
return
68+
6569
encoding = sys.stdout.encoding
6670

6771
if "utf" not in encoding:
6872
msg = (
6973
"Python's stdout does not use a unicode encoding.\n"
7074
"This may cause encoding errors when printing special characters.\n"
7175
"Please set up your system or console to use a unicode encoding.\n"
72-
"When piping mx output, you can force UTF-8 encoding with the environment variable PYTHONIOENCODING=utf-8"
76+
"When piping mx output, you can force UTF-8 encoding with the environment variable PYTHONIOENCODING=utf-8\n"
77+
"This check can be disabled by setting MX_CHECK_IOENCODING=0 environment variable"
7378
)
7479
if is_continuous_integration():
7580
abort(msg)

0 commit comments

Comments
 (0)