Skip to content

Commit

Permalink
chore: add warning when running cibuildwheel with python<3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Oct 20, 2024
1 parent 1001c83 commit 63b3986
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cibuildwheel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 63b3986

Please sign in to comment.