From 36b8e7e524e26d064039427fb424277dadcc255b Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sat, 16 May 2026 22:38:43 -0700 Subject: [PATCH] chore: minor fixups across errors, oci_container, and options (#2860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: minor fixups across errors, oci_container, and options - Strengthen error message wording: 'is expected to' → 'must' and 'is expected to place one' → 'must place exactly one' in FailedWheelRepairError classes. - Remove shell=True from subprocess.run in oci_container debug_info, passing command as a list instead of a string. - Update pinned image error message from 'cibuildwheel 3.x' to 'cibuildwheel 4.x' and add comment about next warning candidate. Assisted-by: OpenCode:glm-5 * Update cibuildwheel/options.py --- cibuildwheel/errors.py | 4 ++-- cibuildwheel/oci_container.py | 7 +++---- cibuildwheel/options.py | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cibuildwheel/errors.py b/cibuildwheel/errors.py index c03b0cd0..dee96d97 100644 --- a/cibuildwheel/errors.py +++ b/cibuildwheel/errors.py @@ -76,7 +76,7 @@ class RepairStepProducedNoWheelError(FatalError): Build failed because the repair step completed successfully but did not produce a wheel. - Your `repair-wheel-command` is expected to place the repaired + Your `repair-wheel-command` must place the repaired wheel in the {dest_dir} directory. See the documentation for example configurations: @@ -94,7 +94,7 @@ class RepairStepProducedMultipleWheelsError(FatalError): Build failed because the repair step completed successfully but produced multiple wheels: {wheels} - Your `repair-wheel-command` is expected to place one repaired + Your `repair-wheel-command` must place exactly one repaired wheel in the {{dest_dir}} directory. See the documentation for example configurations: diff --git a/cibuildwheel/oci_container.py b/cibuildwheel/oci_container.py index b816b5d6..88144469 100644 --- a/cibuildwheel/oci_container.py +++ b/cibuildwheel/oci_container.py @@ -525,13 +525,12 @@ class OCIContainer: return self.call(command, env=environment, capture_output=True) def debug_info(self) -> str: + command = [self.engine.name, "info"] if self.engine.name == "podman": - command = f"{self.engine.name} info --debug" - else: - command = f"{self.engine.name} info" + command.append("--debug") + completed = subprocess.run( command, - shell=True, check=True, cwd=self.cwd, stdin=subprocess.PIPE, diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index 1adbaf87..800c882f 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -708,11 +708,12 @@ class Options: def _check_pinned_image(self, value: str, pinned_images: Mapping[str, str]) -> None: error_set = {"manylinux1", "manylinux2010", "manylinux_2_24", "musllinux_1_1"} + # Currently no warnings, next: https://github.com/pypa/manylinux/issues/1925 warning_set: set[str] = set() if value in error_set: msg = ( - f"cibuildwheel 3.x does not support the image {value!r}. Either upgrade to a " + f"cibuildwheel 4.x does not support the image {value!r}. Either upgrade to a " "supported image or continue using the image by pinning it directly with" " its full OCI registry '{:|@}'." )