Skip to content

Commit 0a89e08

Browse files
committed
chore: use SPEC 0 schedule for cibuildwheel
1 parent b1ed7bb commit 0a89e08

32 files changed

+114
-159
lines changed

.cirrus.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesI
22

33
run_tests: &RUN_TESTS
44
install_cibuildwheel_script:
5+
- python -V
56
- python -m pip install -e ".[dev]" pytest-custom-exit-code
67
run_cibuildwheel_tests_script:
78
- python ./bin/run_tests.py
89

9-
1010
linux_x86_task:
1111
timeout_in: 120m
1212
compute_engine_instance:
@@ -15,9 +15,14 @@ linux_x86_task:
1515
platform: linux
1616
cpu: 8
1717
memory: 8G
18-
18+
env:
19+
VENV_ROOT: ${HOME}/venv-cibuildwheel
20+
PATH: ${VENV_ROOT}/bin:${PATH}
1921
install_pre_requirements_script:
20-
- apt install -y python3-venv python-is-python3
22+
- add-apt-repository -y ppa:deadsnakes/ppa
23+
- apt-get update
24+
- apt-get install -y python3.12-venv
25+
- python3.12 -m venv ${VENV_ROOT}
2126
<<: *RUN_TESTS
2227

2328
linux_aarch64_task:
@@ -28,9 +33,14 @@ linux_aarch64_task:
2833
platform: linux
2934
cpu: 4
3035
memory: 4G
31-
36+
env:
37+
VENV_ROOT: ${HOME}/venv-cibuildwheel
38+
PATH: ${VENV_ROOT}/bin:${PATH}
3239
install_pre_requirements_script:
33-
- apt install -y python3-venv python-is-python3
40+
- add-apt-repository -y ppa:deadsnakes/ppa
41+
- apt-get update
42+
- apt-get install -y python3.12-venv
43+
- python3.12 -m venv ${VENV_ROOT}
3444
<<: *RUN_TESTS
3545

3646
windows_x86_task:
@@ -43,30 +53,32 @@ windows_x86_task:
4353
memory: 8G
4454

4555
install_pre_requirements_script:
46-
- choco install -y --no-progress python3 --version 3.10.6
56+
- choco install -y --no-progress python3 --version 3.12.4
4757
- refreshenv
4858
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
4959
<<: *RUN_TESTS
5060

5161
macos_arm64_task:
5262
macos_instance:
5363
image: ghcr.io/cirruslabs/macos-sonoma-xcode
54-
5564
env:
56-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
65+
VENV_ROOT: ${HOME}/venv-cibuildwheel
66+
PATH: ${VENV_ROOT}/bin:${PATH}
5767
install_pre_requirements_script:
58-
- brew install [email protected]
68+
- brew install [email protected]
69+
- python3.12 -m venv ${VENV_ROOT}
5970
<<: *RUN_TESTS
6071

6172
macos_arm64_cp38_task:
6273
macos_instance:
6374
image: ghcr.io/cirruslabs/macos-sonoma-xcode
64-
6575
env:
66-
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
76+
VENV_ROOT: ${HOME}/venv-cibuildwheel
77+
PATH: ${VENV_ROOT}/bin:${PATH}
6778
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
6879
install_pre_requirements_script:
69-
- brew install [email protected]
80+
- brew install [email protected]
81+
- python3.12 -m venv ${VENV_ROOT}
7082
- curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
7183
- sudo installer -pkg python-3.8.10-macos11.pkg -target /
7284
- rm python-3.8.10-macos11.pkg

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
41-
python_version: ['3.12']
41+
python_version: ['3.13']
4242
include:
4343
- os: ubuntu-latest
44-
python_version: '3.8'
44+
python_version: '3.11'
4545
timeout-minutes: 180
4646
steps:
4747
- uses: actions/checkout@v4
4848
- uses: actions/setup-python@v5
4949
name: Install Python ${{ matrix.python_version }}
5050
with:
5151
python-version: ${{ matrix.python_version }}
52+
allow-prereleases: true
5253

5354
- uses: yezz123/setup-uv@v4
5455

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ repos:
2424
rev: v1.11.2
2525
hooks:
2626
- id: mypy
27-
name: mypy 3.8 on cibuildwheel/
27+
name: mypy 3.11 on cibuildwheel/
2828
exclude: ^cibuildwheel/resources/.*py|bin/generate_schema.py$
29-
args: ["--python-version=3.8"]
29+
args: ["--python-version=3.11"]
3030
additional_dependencies: &mypy-dependencies
3131
- bracex
3232
- nox

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ branches:
88

99
jobs:
1010
include:
11-
- name: Linux | x86_64 + i686 | Python 3.9
12-
python: 3.9
11+
- name: Linux | x86_64 + i686 | Python 3.11
12+
python: 3.11
1313
services: docker
1414
env: PYTHON=python
1515

16-
- name: Linux | arm64 | Python 3.9
17-
python: 3.9
16+
- name: Linux | arm64 | Python 3.11
17+
python: 3.11
1818
services: docker
1919
arch: arm64-graviton2
2020
group: edge
2121
virt: vm
2222
env: PYTHON=python
2323

24-
- name: Linux | ppc64le | Python 3.9
25-
python: 3.9
24+
- name: Linux | ppc64le | Python 3.11
25+
python: 3.11
2626
services: docker
2727
arch: ppc64le
2828
allow_failure: True
@@ -32,16 +32,16 @@ jobs:
3232
# c.f. https://travis-ci.community/t/running-out-of-disk-space-quota-when-using-docker-on-ppc64le/11634
3333
- PYTEST_ADDOPTS='-k "not test_manylinuxXXXX_only"'
3434

35-
- name: Windows | x86_64 | Python 3.9
35+
- name: Windows | x86_64 | Python 3.11
3636
os: windows
3737
language: shell
3838
before_install:
39-
- choco upgrade python3 -y --version 3.9.13 --limit-output --params "/InstallDir:C:\\Python39"
39+
- choco upgrade python3 -y --version 3.11.9 --limit-output --params "/InstallDir:C:\\Python311"
4040
env:
41-
- PYTHON=C:\\Python39\\python
41+
- PYTHON=C:\\Python311\\python
4242

43-
- name: Linux | s390x | Python 3.9
44-
python: 3.9
43+
- name: Linux | s390x | Python 3.11
44+
python: 3.11
4545
services: docker
4646
arch: s390x
4747
allow_failure: True

CI.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
This is a summary of the host Python versions and platforms covered by the different CI platforms:
22

3-
| | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 |
4-
|---------|----------------------------------|-----------|-----------|---------|--------------------------------------------------|
5-
| Linux | Azure Pipelines / GitHub Actions | Travis CI | Cirrus CI | | AppVeyor¹ / CircleCI¹ / GitHub Actions / GitLab¹ |
6-
| macOS | Azure Pipelines | | Cirrus CI | GitLab¹ | AppVeyor¹ /CircleCI¹ / GitHub Actions |
7-
| Windows | Azure Pipelines | Travis CI | Cirrus CI | | AppVeyor¹ / GitHub Actions / GitLab¹ |
3+
| | 3.11 | 3.12 | 3.13 |
4+
|---------|----------------------------------------------|---------------------------------------------|----------------|
5+
| Linux | Azure Pipelines / GitHub Actions / Travis CI | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
6+
| macOS | Azure Pipelines / GitLab¹ | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
7+
| Windows | Azure Pipelines / Travis CI | AppVeyor¹ / Cirrus CI / GitLab¹ | GitHub Actions |
88

99
> ¹ Runs a reduced set of tests to reduce CI load
1010
11-
Non-x86 architectures are covered on Travis CI using Python 3.9.
11+
Non-x86 architectures are covered on Travis CI using Python 3.11.

azure-pipelines.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ pr:
55
- .pre-commit-config.yaml
66

77
jobs:
8-
- job: linux_38
8+
- job: linux_311
99
timeoutInMinutes: 120
1010
pool: {vmImage: 'Ubuntu-20.04'}
1111
steps:
1212
- task: UsePythonVersion@0
1313
inputs:
14-
versionSpec: '3.8'
14+
versionSpec: '3.11'
1515
- bash: |
1616
python -m pip install -e ".[dev]"
1717
python ./bin/run_tests.py
1818
19-
- job: macos_38
19+
- job: macos_311
2020
pool: {vmImage: 'macOS-12'}
2121
steps:
2222
- task: UsePythonVersion@0
2323
inputs:
24-
versionSpec: '3.8'
24+
versionSpec: '3.11'
2525
- bash: |
2626
python -m pip install -e ".[dev]"
2727
python ./bin/run_tests.py --num-processes 2
2828
29-
- job: windows_38
29+
- job: windows_311
3030
pool: {vmImage: 'windows-2019'}
3131
timeoutInMinutes: 180
3232
steps:
3333
- task: UsePythonVersion@0
3434
inputs:
35-
versionSpec: '3.8'
35+
versionSpec: '3.11'
3636
- bash: |
3737
python -m pip install -e ".[dev]"
3838
python ./bin/run_tests.py

bin/bump_version.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111
import os
1212
import subprocess
1313
import sys
14+
import tomllib
1415
import urllib.parse
1516
from pathlib import Path
1617

1718
import click
1819
from packaging.version import InvalidVersion, Version
1920

20-
if sys.version_info < (3, 11):
21-
import tomli as tomllib
22-
else:
23-
import tomllib
24-
2521
config = [
2622
# file path, version find/replace format
2723
("pyproject.toml", 'version = "{}"'),

bin/update_nodejs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import difflib
66
import logging
7+
import tomllib
78
from dataclasses import dataclass
89
from pathlib import Path
910
from typing import Final
@@ -16,8 +17,6 @@
1617
from rich.logging import RichHandler
1718
from rich.syntax import Syntax
1819

19-
from cibuildwheel._compat import tomllib
20-
2120
log = logging.getLogger("cibw")
2221

2322
# Looking up the dir instead of using utils.resources_dir

bin/update_pythons.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
import copy
66
import difflib
77
import logging
8+
import tomllib
89
from collections.abc import Mapping, MutableMapping
910
from pathlib import Path
10-
from typing import Any, Final, Literal, TypedDict, Union
11+
from typing import Any, Final, Literal, TypedDict
1112

1213
import click
1314
import requests
@@ -17,7 +18,6 @@
1718
from rich.logging import RichHandler
1819
from rich.syntax import Syntax
1920

20-
from cibuildwheel._compat import tomllib
2121
from cibuildwheel.extra import dump_python_configurations
2222

2323
log = logging.getLogger("cibw")
@@ -50,7 +50,7 @@ class ConfigMacOS(TypedDict):
5050
url: str
5151

5252

53-
AnyConfig = Union[ConfigWinCP, ConfigWinPP, ConfigMacOS]
53+
AnyConfig = ConfigWinCP | ConfigWinPP | ConfigMacOS
5454

5555

5656
# The following set of "Versions" classes allow the initial call to the APIs to

bin/update_virtualenv.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import difflib
66
import logging
77
import subprocess
8+
import tomllib
89
from dataclasses import dataclass
910
from pathlib import Path
1011
from typing import Final
@@ -15,8 +16,6 @@
1516
from rich.logging import RichHandler
1617
from rich.syntax import Syntax
1718

18-
from cibuildwheel._compat import tomllib
19-
2019
log = logging.getLogger("cibw")
2120

2221
# Looking up the dir instead of using utils.resources_dir

cibuildwheel/__main__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import argparse
4+
import contextlib
45
import dataclasses
56
import os
67
import shutil
@@ -12,7 +13,7 @@
1213
from collections.abc import Iterable, Sequence, Set
1314
from pathlib import Path
1415
from tempfile import mkdtemp
15-
from typing import Protocol
16+
from typing import Protocol, assert_never
1617

1718
import cibuildwheel
1819
import cibuildwheel.linux
@@ -21,7 +22,6 @@
2122
import cibuildwheel.util
2223
import cibuildwheel.windows
2324
from cibuildwheel import errors
24-
from cibuildwheel._compat.typing import assert_never
2525
from cibuildwheel.architecture import Architecture, allowed_architectures_check
2626
from cibuildwheel.logger import log
2727
from cibuildwheel.options import CommandLineArguments, Options, compute_options
@@ -31,7 +31,6 @@
3131
BuildSelector,
3232
CIProvider,
3333
Unbuffered,
34-
chdir,
3534
detect_ci_provider,
3635
fix_ansi_codes_for_github_actions,
3736
strtobool,
@@ -200,7 +199,7 @@ def main_inner(global_options: GlobalOptions) -> None:
200199
# This is now the new package dir
201200
args.package_dir = project_dir.resolve()
202201

203-
with chdir(project_dir):
202+
with contextlib.chdir(project_dir):
204203
build_in_directory(args)
205204
finally:
206205
# avoid https://github.com/python/cpython/issues/86962 by performing

cibuildwheel/_compat/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

cibuildwheel/_compat/tomllib.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

cibuildwheel/_compat/typing.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

cibuildwheel/architecture.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
import sys
77
from collections.abc import Set
88
from enum import Enum
9-
from typing import Final, Literal
9+
from typing import Final, Literal, assert_never
1010

11-
from ._compat.typing import assert_never
1211
from .typing import PlatformName
1312

1413
PRETTY_NAMES: Final[dict[PlatformName, str]] = {

0 commit comments

Comments
 (0)