Skip to content

Commit 7e204b0

Browse files
committed
break: drop Python 3.8
1 parent 6f8121f commit 7e204b0

25 files changed

+87
-375
lines changed

.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
@@ -528,10 +528,13 @@ def check_for_invalid_selectors(
528528
msg += "This selector matches a group that wasn't enabled. Enable it using the `enable` option or remove this selector. "
529529

530530
if "p2" in selector_ or "p35" in selector_:
531-
msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 1.x series or update `{selector_name}`. "
531+
msg += f"cibuildwheel 4.x no longer supports Python < 3.9. Please use the 1.x series or update `{selector_name}`. "
532532
error_type = errors.DeprecationError
533533
if "p36" in selector_ or "p37" in selector_:
534-
msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update `{selector_name}`. "
534+
msg += f"cibuildwheel 4.x no longer supports Python < 3.9. Please use the 2.x series or update `{selector_name}`. "
535+
error_type = errors.DeprecationError
536+
if "p38" in selector_:
537+
msg += f"cibuildwheel 4.x no longer supports Python < 3.9. Please use the 3.x series or update `{selector_name}`. "
535538
error_type = errors.DeprecationError
536539

537540
if selector_name == "build":

cibuildwheel/platforms/macos.py

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -542,13 +542,6 @@ def build(options: Options, tmp_path: Path) -> None:
542542

543543
if build_options.test_command and build_options.test_selector(config.identifier):
544544
machine_arch = platform.machine()
545-
python_arch = call(
546-
"python",
547-
"-sSc",
548-
"import platform; print(platform.machine())",
549-
env=env,
550-
capture_stdout=True,
551-
).strip()
552545
testing_archs: list[Literal["x86_64", "arm64"]]
553546

554547
if config_is_arm64:
@@ -596,24 +589,6 @@ def build(options: Options, tmp_path: Path) -> None:
596589
# skip this test
597590
continue
598591

599-
is_cp38 = config.identifier.startswith("cp38-")
600-
if testing_arch == "arm64" and is_cp38 and python_arch != "arm64":
601-
log.warning(
602-
unwrap(
603-
"""
604-
While cibuildwheel can build CPython 3.8 universal2/arm64 wheels, we
605-
cannot test the arm64 part of them, even when running on an Apple
606-
Silicon machine. This is because we use the x86_64 installer of
607-
CPython 3.8. See the discussion in
608-
https://github.com/pypa/cibuildwheel/pull/1169 for the details. To
609-
silence this warning, set `CIBW_TEST_SKIP: "cp38-macosx_*:arm64"`.
610-
"""
611-
)
612-
)
613-
614-
# skip this test
615-
continue
616-
617592
log.step(
618593
"Testing wheel..."
619594
if testing_arch == machine_arch
@@ -670,33 +645,16 @@ def build(options: Options, tmp_path: Path) -> None:
670645
shell_with_arch(before_test_prepared, env=virtualenv_env)
671646

672647
# install the wheel
673-
if is_cp38 and python_arch == "x86_64":
674-
virtualenv_env_install_wheel = virtualenv_env.copy()
675-
virtualenv_env_install_wheel["SYSTEM_VERSION_COMPAT"] = "0"
676-
log.notice(
677-
unwrap(
678-
"""
679-
Setting SYSTEM_VERSION_COMPAT=0 to ensure CPython 3.8 can get
680-
correct macOS version and allow installation of wheels with
681-
MACOSX_DEPLOYMENT_TARGET >= 11.0.
682-
See https://github.com/pypa/cibuildwheel/issues/1767 for the
683-
details.
684-
"""
685-
)
686-
)
687-
else:
688-
virtualenv_env_install_wheel = virtualenv_env
689-
690648
pip_install(
691649
f"{repaired_wheel}{build_options.test_extras}",
692-
env=virtualenv_env_install_wheel,
650+
env=virtualenv_env,
693651
)
694652

695653
# test the wheel
696654
if build_options.test_requires:
697655
pip_install(
698656
*build_options.test_requires,
699-
env=virtualenv_env_install_wheel,
657+
env=virtualenv_env,
700658
)
701659

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

cibuildwheel/platforms/windows.py

Lines changed: 1 addition & 9 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 == "build[uv]"
275267
uv_path = find_uv()
276268

@@ -404,7 +396,7 @@ def build(options: Options, tmp_path: Path) -> None:
404396
build_options = options.build_options(config.identifier)
405397
build_frontend = build_options.build_frontend
406398

407-
use_uv = build_frontend.name == "build[uv]" and can_use_uv(config)
399+
use_uv = build_frontend.name == "build[uv]"
408400
log.build_start(config.identifier)
409401

410402
identifier_tmp_dir = tmp_path / config.identifier

0 commit comments

Comments
 (0)