diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 973c48a86..9cecd4304 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -402,6 +402,15 @@ def get_build_identifiers( def detect_warnings(*, options: Options, identifiers: Iterable[str]) -> list[str]: warnings = [] + python_version_deprection = ((3, 11), 3) + if sys.version_info[:2] < python_version_deprection[0]: + python_version = ".".join(map(str, python_version_deprection[0])) + msg = ( + f"cibuildwheel {python_version_deprection[1]}+ will require Python {python_version}+, " + "please upgrade your python version." + ) + warnings.append(msg) + # warn about deprecated {python} and {pip} for option_name in ["test_command", "before_build"]: option_values = [getattr(options.build_options(i), option_name) for i in identifiers]