Skip to content

Commit 7e5810c

Browse files
authored
feat: drop python 3.6 & 3.7 support (#2282)
1 parent e061af0 commit 7e5810c

19 files changed

+105
-260
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,12 @@ While cibuildwheel itself requires a recent Python version to run (we support th
2626

2727
| | 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 | Pyodide |
2828
|----------------|----|-----|-----|-----|-----|----|-----|----|-----|-----|---|-----|
29-
| CPython 3.6 || N/A ||| N/A |||||| ✅⁵ | N/A |
30-
| CPython 3.7 || N/A ||| N/A |||||| ✅⁵ | N/A |
3129
| CPython 3.8 ||||| N/A |||||| ✅⁵ | N/A |
3230
| CPython 3.9 ||||| ✅² |||||| ✅⁵ | N/A |
3331
| CPython 3.10 ||||| ✅² |||||| ✅⁵ | N/A |
3432
| CPython 3.11 ||||| ✅² |||||| ✅⁵ | N/A |
3533
| CPython 3.12 ||||| ✅² |||||| ✅⁵ | ✅⁴ |
3634
| CPython 3.13³ ||||| ✅² |||||| ✅⁵ | N/A |
37-
| PyPy 3.7 v7.3 || N/A || N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A |
3835
| PyPy 3.8 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A |
3936
| PyPy 3.9 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A |
4037
| PyPy 3.10 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A |

cibuildwheel/linux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def build_in_container(
203203
log.build_start(config.identifier)
204204
build_options = options.build_options(config.identifier)
205205
build_frontend = build_options.build_frontend or BuildFrontendConfig("pip")
206-
use_uv = build_frontend.name == "build[uv]" and Version(config.version) >= Version("3.8")
206+
use_uv = build_frontend.name == "build[uv]"
207207
pip = ["uv", "pip"] if use_uv else ["pip"]
208208

209209
dependency_constraint_flags: list[PathOrStr] = []

cibuildwheel/macos.py

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -191,21 +191,13 @@ def install_pypy(tmp: Path, url: str) -> Path:
191191
return installation_path / "bin" / "pypy3"
192192

193193

194-
def can_use_uv(python_configuration: PythonConfiguration) -> bool:
195-
conditions = (Version(python_configuration.version) >= Version("3.8"),)
196-
return all(conditions)
197-
198-
199194
def setup_python(
200195
tmp: Path,
201196
python_configuration: PythonConfiguration,
202197
dependency_constraint_flags: Sequence[PathOrStr],
203198
environment: ParsedEnvironment,
204199
build_frontend: BuildFrontendName,
205200
) -> tuple[Path, dict[str, str]]:
206-
if build_frontend == "build[uv]" and not can_use_uv(python_configuration):
207-
build_frontend = "build"
208-
209201
uv_path = find_uv()
210202
use_uv = build_frontend == "build[uv]"
211203

@@ -315,20 +307,19 @@ def setup_python(
315307
)
316308
env["MACOSX_DEPLOYMENT_TARGET"] = default_target
317309

318-
if python_configuration.version not in {"3.6", "3.7"}:
319-
if config_is_arm64:
320-
# macOS 11 is the first OS with arm64 support, so the wheels
321-
# have that as a minimum.
322-
env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-11.0-arm64")
323-
env.setdefault("ARCHFLAGS", "-arch arm64")
324-
elif config_is_universal2:
325-
env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-universal2")
326-
env.setdefault("ARCHFLAGS", "-arch arm64 -arch x86_64")
327-
elif python_configuration.identifier.endswith("x86_64"):
328-
# even on the macos11.0 Python installer, on the x86_64 side it's
329-
# compatible back to 10.9.
330-
env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-x86_64")
331-
env.setdefault("ARCHFLAGS", "-arch x86_64")
310+
if config_is_arm64:
311+
# macOS 11 is the first OS with arm64 support, so the wheels
312+
# have that as a minimum.
313+
env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-11.0-arm64")
314+
env.setdefault("ARCHFLAGS", "-arch arm64")
315+
elif config_is_universal2:
316+
env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-universal2")
317+
env.setdefault("ARCHFLAGS", "-arch arm64 -arch x86_64")
318+
elif python_configuration.identifier.endswith("x86_64"):
319+
# even on the macos11.0 Python installer, on the x86_64 side it's
320+
# compatible back to 10.9.
321+
env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-x86_64")
322+
env.setdefault("ARCHFLAGS", "-arch x86_64")
332323

333324
building_arm64 = config_is_arm64 or config_is_universal2
334325
if building_arm64 and get_macos_version() < (10, 16) and "SDKROOT" not in env:
@@ -416,7 +407,7 @@ def build(options: Options, tmp_path: Path) -> None:
416407
for config in python_configurations:
417408
build_options = options.build_options(config.identifier)
418409
build_frontend = build_options.build_frontend or BuildFrontendConfig("pip")
419-
use_uv = build_frontend.name == "build[uv]" and can_use_uv(config)
410+
use_uv = build_frontend.name == "build[uv]"
420411
uv_path = find_uv()
421412
if use_uv and uv_path is None:
422413
msg = "uv not found"

cibuildwheel/options.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,12 @@ def _get_pinned_container_images() -> Mapping[str, Mapping[str, str]]:
980980

981981
def deprecated_selectors(name: str, selector: str, *, error: bool = False) -> None:
982982
if "p2" in selector or "p35" in selector:
983-
msg = f"cibuildwheel 2.x no longer supports Python < 3.6. Please use the 1.x series or update {name}"
983+
msg = f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 1.x series or update {name}"
984+
if error:
985+
raise errors.DeprecationError(msg)
986+
log.warning(msg)
987+
if "p36" in selector or "p37" in selector:
988+
msg = f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update {name}"
984989
if error:
985990
raise errors.DeprecationError(msg)
986991
log.warning(msg)

0 commit comments

Comments
 (0)