Skip to content

Commit 1c3d5c4

Browse files
committed
fix: try making the warnings once per Options
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 2a25c6d commit 1c3d5c4

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

cibuildwheel/options.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ def __init__(
576576
self.command_line_arguments = command_line_arguments
577577
self.env = env
578578
self._defaults = defaults
579+
self._image_warnings = set[str]()
579580

580581
self.reader = OptionsReader(
581582
None if defaults else self.config_file_path,
@@ -775,19 +776,24 @@ def _compute_build_options(self, identifier: str | None) -> BuildOptions:
775776
# default to manylinux2014
776777
image = pinned_images["manylinux2014"]
777778
elif config_value in pinned_images:
778-
if config_value in {
779-
"manylinux1",
780-
"manylinux2010",
781-
"manylinux_2_24",
782-
"musllinux_1_1",
783-
}:
779+
if (
780+
config_value
781+
in {
782+
"manylinux1",
783+
"manylinux2010",
784+
"manylinux_2_24",
785+
"musllinux_1_1",
786+
}
787+
and config_value not in self._image_warnings
788+
):
789+
self._image_warnings.add(config_value)
784790
msg = (
785791
f"Deprecated image {config_value!r}. This value will not work"
786792
" in a future version of cibuildwheel. Either upgrade to a supported"
787793
" image or continue using the deprecated image by pinning directly"
788794
f" to {pinned_images[config_value]!r}."
789795
)
790-
log.warning(msg, deduplicate=True)
796+
log.warning(msg)
791797
image = pinned_images[config_value]
792798
else:
793799
image = config_value

0 commit comments

Comments
 (0)