Skip to content

Commit fbdf2df

Browse files
committed
break: drop Python 3.8
1 parent 880a211 commit fbdf2df

31 files changed

Lines changed: 98 additions & 420 deletions

.cirrus.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,3 @@ macos_arm64_task:
7373
- brew install python@3.12
7474
- python3.12 -m venv ${VENV_ROOT}
7575
<<: *RUN_TESTS
76-
77-
macos_arm64_cp38_task:
78-
macos_instance:
79-
image: ghcr.io/cirruslabs/macos-runner:sequoia
80-
env:
81-
VENV_ROOT: ${HOME}/venv-cibuildwheel
82-
PATH: ${VENV_ROOT}/bin:${PATH}
83-
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto or test_dummy_serial'
84-
install_pre_requirements_script:
85-
- brew install python@3.12
86-
- python3.12 -m venv ${VENV_ROOT}
87-
- curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
88-
- sudo installer -pkg python-3.8.10-macos11.pkg -target /
89-
- rm python-3.8.10-macos11.pkg
90-
- sh "/Applications/Python 3.8/Install Certificates.command"
91-
<<: *RUN_TESTS

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ While cibuildwheel itself requires a recent Python version to run (we support th
2424

2525
| | macOS Intel | macOS Apple Silicon | Windows 64bit | Windows 32bit | Windows Arm64 | manylinux<br/>musllinux x86_64 | manylinux<br/>musllinux i686 | manylinux<br/>musllinux aarch64 | manylinux<br/>musllinux ppc64le | manylinux<br/>musllinux s390x | manylinux<br/>musllinux armv7l | Android | iOS | Pyodide |
2626
|--------------------|----|-----|----|-----|-----|----|-----|----|-----|-----|---|-----|-----|-----|
27-
| CPython 3.8 ||||| N/A |||||| ✅⁵ | N/A | N/A | N/A |
2827
| CPython 3.9 ||||| ✅² |||||| ✅⁵ | N/A | N/A | N/A |
2928
| CPython 3.10 ||||| ✅² |||||| ✅⁵ | N/A | N/A | N/A |
3029
| CPython 3.11 ||||| ✅² |||||| ✅⁵ | N/A | N/A | N/A |
3130
| CPython 3.12 ||||| ✅² |||||| ✅⁵ | N/A | N/A | ✅⁴ |
3231
| CPython 3.13³ ||||| ✅² |||||| ✅⁵ ||| ✅⁴ |
3332
| CPython 3.14 ||||| ✅² |||||| ✅⁵ ||| N/A |
34-
| PyPy 3.8 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A | N/A |
3533
| PyPy 3.9 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A | N/A |
3634
| PyPy 3.10 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A | N/A |
3735
| PyPy 3.11 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A | N/A |

cibuildwheel/__main__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,13 @@ def check_for_invalid_selectors(
534534
msg += "This selector matches a group that wasn't enabled. Enable it using the `enable` option or remove this selector. "
535535

536536
if "p2" in selector_ or "p35" in selector_:
537-
msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 1.x series or update `{selector_name}`. "
537+
msg += f"cibuildwheel 4.x no longer supports Python < 3.9. Please use the 1.x series or update `{selector_name}`. "
538538
error_type = errors.DeprecationError
539539
if "p36" in selector_ or "p37" in selector_:
540-
msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update `{selector_name}`. "
540+
msg += f"cibuildwheel 4.x no longer supports Python < 3.9. Please use the 2.x series or update `{selector_name}`. "
541+
error_type = errors.DeprecationError
542+
if "p38" in selector_:
543+
msg += f"cibuildwheel 4.x no longer supports Python < 3.9. Please use the 3.x series or update `{selector_name}`. "
541544
error_type = errors.DeprecationError
542545

543546
if selector_name == "build":

cibuildwheel/frontend.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from collections.abc import Sequence
55
from typing import Literal, Self, get_args
66

7-
from .logger import log
87
from .util.helpers import parse_key_value_string
98

109
BuildFrontendName = Literal["pip", "build", "build[uv]", "uv"]
@@ -36,12 +35,8 @@ def options_summary(self) -> str | dict[str, str]:
3635
return {"name": self.name, "args": repr(self.args)}
3736

3837

39-
def _get_verbosity_flags(level: int, frontend: BuildFrontendName, *, py38: bool) -> list[str]:
38+
def _get_verbosity_flags(level: int, frontend: BuildFrontendName) -> list[str]:
4039
if level < 0:
41-
if frontend.startswith("build") and py38:
42-
msg = f"build_verbosity {level} is not supported for {frontend} frontend. Ignoring."
43-
log.warning(msg)
44-
return []
4540
return ["-" + -level * "q"]
4641

4742
if level > 0:
@@ -75,10 +70,10 @@ def parse_config_settings(config_settings_str: str) -> dict[str, str | list[str]
7570

7671

7772
def get_build_frontend_extra_flags(
78-
build_frontend: BuildFrontendConfig, verbosity_level: int, config_settings: str, *, py38: bool
73+
build_frontend: BuildFrontendConfig, verbosity_level: int, config_settings: str
7974
) -> list[str]:
8075
return [
8176
*_split_config_settings(config_settings),
8277
*build_frontend.args,
83-
*_get_verbosity_flags(verbosity_level, build_frontend.name, py38=py38),
78+
*_get_verbosity_flags(verbosity_level, build_frontend.name),
8479
]

cibuildwheel/platforms/android.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ def build_wheel(state: BuildState) -> Path:
457457
state.options.build_frontend,
458458
state.options.build_verbosity,
459459
state.options.config_settings,
460-
py38=False,
461460
),
462461
env=state.android_env,
463462
)
@@ -475,7 +474,6 @@ def build_wheel(state: BuildState) -> Path:
475474
state.options.build_frontend,
476475
state.options.build_verbosity,
477476
state.options.config_settings,
478-
py38=False,
479477
),
480478
env=state.android_env,
481479
)

cibuildwheel/platforms/ios.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,6 @@ def build(options: Options, tmp_path: Path) -> None:
490490
build_frontend,
491491
build_options.build_verbosity,
492492
build_options.config_settings,
493-
py38=False,
494493
)
495494

496495
match build_frontend.name:

cibuildwheel/platforms/linux.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ def build_in_container(
277277
build_frontend,
278278
build_options.build_verbosity,
279279
build_options.config_settings,
280-
py38=config.identifier[1:].startswith("p38"),
281280
)
282281

283282
match build_frontend.name:

cibuildwheel/platforms/macos.py

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ def build(options: Options, tmp_path: Path) -> None:
475475
build_frontend,
476476
build_options.build_verbosity,
477477
build_options.config_settings,
478-
py38=config.identifier[1:].startswith("p38"),
479478
)
480479

481480
build_env = env.copy()
@@ -568,13 +567,6 @@ def build(options: Options, tmp_path: Path) -> None:
568567

569568
if build_options.test_command and build_options.test_selector(config.identifier):
570569
machine_arch = platform.machine()
571-
python_arch = call(
572-
"python",
573-
"-sSc",
574-
"import platform; print(platform.machine())",
575-
env=env,
576-
capture_stdout=True,
577-
).strip()
578570
testing_archs: list[Literal["x86_64", "arm64"]]
579571

580572
if config_is_arm64:
@@ -622,24 +614,6 @@ def build(options: Options, tmp_path: Path) -> None:
622614
# skip this test
623615
continue
624616

625-
is_cp38 = config.identifier.startswith("cp38-")
626-
if testing_arch == "arm64" and is_cp38 and python_arch != "arm64":
627-
log.warning(
628-
unwrap(
629-
"""
630-
While cibuildwheel can build CPython 3.8 universal2/arm64 wheels, we
631-
cannot test the arm64 part of them, even when running on an Apple
632-
Silicon machine. This is because we use the x86_64 installer of
633-
CPython 3.8. See the discussion in
634-
https://github.com/pypa/cibuildwheel/pull/1169 for the details. To
635-
silence this warning, set `CIBW_TEST_SKIP: "cp38-macosx_*:arm64"`.
636-
"""
637-
)
638-
)
639-
640-
# skip this test
641-
continue
642-
643617
log.step(
644618
"Testing wheel..."
645619
if testing_arch == machine_arch
@@ -696,33 +670,16 @@ def build(options: Options, tmp_path: Path) -> None:
696670
shell_with_arch(before_test_prepared, env=virtualenv_env)
697671

698672
# install the wheel
699-
if is_cp38 and python_arch == "x86_64":
700-
virtualenv_env_install_wheel = virtualenv_env.copy()
701-
virtualenv_env_install_wheel["SYSTEM_VERSION_COMPAT"] = "0"
702-
log.notice(
703-
unwrap(
704-
"""
705-
Setting SYSTEM_VERSION_COMPAT=0 to ensure CPython 3.8 can get
706-
correct macOS version and allow installation of wheels with
707-
MACOSX_DEPLOYMENT_TARGET >= 11.0.
708-
See https://github.com/pypa/cibuildwheel/issues/1767 for the
709-
details.
710-
"""
711-
)
712-
)
713-
else:
714-
virtualenv_env_install_wheel = virtualenv_env
715-
716673
pip_install(
717674
f"{repaired_wheel}{build_options.test_extras}",
718-
env=virtualenv_env_install_wheel,
675+
env=virtualenv_env,
719676
)
720677

721678
# test the wheel
722679
if build_options.test_requires:
723680
pip_install(
724681
*build_options.test_requires,
725-
env=virtualenv_env_install_wheel,
682+
env=virtualenv_env,
726683
)
727684

728685
# run the tests from a temp dir, with an absolute path in the command

cibuildwheel/platforms/pyodide.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ def build(options: Options, tmp_path: Path) -> None:
419419
build_frontend,
420420
build_options.build_verbosity,
421421
build_options.config_settings,
422-
py38=False,
423422
)
424423

425424
call(

cibuildwheel/platforms/windows.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,6 @@ def setup_rust_cross_compile(
232232
)
233233

234234

235-
def can_use_uv(python_configuration: PythonConfiguration) -> bool:
236-
conditions = (not python_configuration.identifier.startswith("pp38-"),)
237-
return all(conditions)
238-
239-
240235
def setup_python(
241236
tmp: Path,
242237
python_configuration: PythonConfiguration,
@@ -268,9 +263,6 @@ def setup_python(
268263
raise ValueError(msg)
269264
assert base_python.exists()
270265

271-
if build_frontend == "build[uv]" and not can_use_uv(python_configuration):
272-
build_frontend = "build"
273-
274266
use_uv = build_frontend in {"build[uv]", "uv"}
275267
uv_path = find_uv()
276268

@@ -405,7 +397,7 @@ def build(options: Options, tmp_path: Path) -> None:
405397
for config in python_configurations:
406398
build_options = options.build_options(config.identifier)
407399
build_frontend = build_options.build_frontend
408-
use_uv = build_frontend.name in {"build[uv]", "uv"} and can_use_uv(config)
400+
use_uv = build_frontend.name in {"build[uv]", "uv"}
409401
log.build_start(config.identifier)
410402

411403
identifier_tmp_dir = tmp_path / config.identifier
@@ -453,7 +445,6 @@ def build(options: Options, tmp_path: Path) -> None:
453445
build_frontend,
454446
build_options.build_verbosity,
455447
build_options.config_settings,
456-
py38=config.identifier[1:].startswith("p38"),
457448
)
458449

459450
if (

0 commit comments

Comments
 (0)