From bc17f103f199366cfe2669b440e0ca4b01695362 Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 14 Jul 2022 12:47:01 +0200 Subject: [PATCH 01/28] chore: drop python 3.6 for cibuildwheel driver This drops python 3.6 for cibuildwheel. Building python 3.6 packages is still supported. --- .circleci/config.yml | 10 +++++----- .pre-commit-config.yaml | 17 +++-------------- .travis.yml | 22 +++++++++++----------- CI.md | 12 ++++++------ azure-pipelines.yml | 11 ----------- bin/update_dependencies.py | 1 - cibuildwheel/bashlex_eval.py | 4 +--- docs/contributing.md | 2 -- examples/circleci-minimal.yml | 2 +- examples/travis-ci-test-and-deploy.yml | 1 - pyproject.toml | 4 ++-- setup.cfg | 4 +--- test/test_macos_archs.py | 2 +- test/utils.py | 2 +- unit_test/oci_container_test.py | 4 ++-- 15 files changed, 34 insertions(+), 64 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62cefcabe..3a657f7e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 jobs: - osx-python3.6: + osx-python3.9: macos: xcode: 12.5.1 environment: @@ -17,9 +17,9 @@ jobs: command: venv/bin/python ./bin/run_tests.py no_output_timeout: 30m - linux-python3.6: + linux-python3.9: docker: - - image: circleci/python:3.6 + - image: circleci/python:3.9 environment: PYTHON: python3 # Temporarily restrict the tests that are run on CircleCI to prevent @@ -41,5 +41,5 @@ workflows: version: 2 all-tests: jobs: - - osx-python3.6 - - linux-python3.6 + - osx-python3.9 + - linux-python3.9 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fdd22536f..388640192 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,12 +17,6 @@ repos: rev: v2.37.1 hooks: - id: pyupgrade - name: PyUpgrade 3.6+ - args: ["--py36-plus"] - exclude: ^bin/ - - id: pyupgrade - name: PyUpgrade 3.7+ on bin - exclude: ^(cibuildwheel|unit_test|test)/ args: ["--py37-plus"] # Autoremoves unused imports @@ -52,9 +46,9 @@ repos: rev: v0.961 hooks: - id: mypy - name: mypy 3.6 on cibuildwheel/ - exclude: ^(bin|cibuildwheel/resources|docs)/.*py$ - args: ["--python-version=3.6"] + name: mypy 3.7 on cibuildwheel/ + exclude: ^cibuildwheel/resources/.*py$ + args: ["--python-version=3.7"] additional_dependencies: &mypy-dependencies - nox - packaging>=21.0 @@ -70,11 +64,6 @@ repos: - types-requests - bracex - dataclasses - - id: mypy - name: mypy 3.7+ on bin/ - files: ^((bin|docs)/.*py)$ - args: ["--python-version=3.7"] - additional_dependencies: *mypy-dependencies - id: mypy name: mypy 3.10 args: ["--python-version=3.10"] diff --git a/.travis.yml b/.travis.yml index aad9e5a54..4256a69bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,21 +8,21 @@ branches: jobs: include: - - name: Linux | x86_64 + i686 | Python 3.6 - python: 3.6 + - name: Linux | x86_64 + i686 | Python 3.7 + python: 3.7 services: docker env: PYTHON=python - - name: Linux | arm64 | Python 3.6 - python: 3.6 + - name: Linux | arm64 | Python 3.7 + python: 3.7 services: docker arch: arm64-graviton2 group: edge virt: vm env: PYTHON=python - - name: Linux | ppc64le | Python 3.6 - python: 3.6 + - name: Linux | ppc64le | Python 3.7 + python: 3.7 services: docker arch: ppc64le allow_failure: True @@ -32,18 +32,18 @@ jobs: # c.f. https://travis-ci.community/t/running-out-of-disk-space-quota-when-using-docker-on-ppc64le/11634 - PYTEST_ADDOPTS='-k "not test_manylinuxXXXX_only"' - - name: Windows | x86_64 | Python 3.6 + - name: Windows | x86_64 | Python 3.7 os: windows language: shell before_install: - - choco upgrade python3 -y --version 3.6.8 --limit-output + - choco upgrade python3 -y --version 3.7.9 --limit-output # Update root certificates to fix SSL error; see http://www.chawn.com/RootCerts.htm - powershell "md C:\temp\certs; CertUtil -generateSSTFromWU C:\temp\certs\RootStore.sst; Get-ChildItem -Path C:\\temp\certs\Rootstore.sst | Import-Certificate -CertStoreLocation Cert:\\LocalMachine\\Root\\ | out-null" env: - - PYTHON=C:\\Python36\\python + - PYTHON=C:\\Python37\\python - - name: Linux | s390x | Python 3.6 - python: 3.6 + - name: Linux | s390x | Python 3.7 + python: 3.7 services: docker arch: s390x env: PYTHON=python diff --git a/CI.md b/CI.md index 8ac4ada58..76167c351 100644 --- a/CI.md +++ b/CI.md @@ -1,11 +1,11 @@ This is a summary of the Python versions and platforms covered by the different CI platforms: -| | 3.6 | 3.7 | 3.8 | -|----------|------------------------------|-----------------------------|------------------| -| Linux | Travis CI / CircleCI | AppVeyor¹ / GitHub Actions | Azure Pipelines | -| macOS | CircleCI | AppVeyor¹ / GitHub Actions | Azure Pipelines | -| Windows | Travis CI / Azure Pipelines | AppVeyor¹ / GitHub Actions | Azure Pipelines | +| | 3.7 | 3.8 | 3.9 | 3.10 | +|----------|-----------------------|---------------------------|----------|----------------| +| Linux | AppVeyor¹ / Travis CI | Azure Pipelines / GitLab | CircleCI | GitHub Actions | +| macOS | AppVeyor¹ / Travis CI | Azure Pipelines | CircleCI | GitHub Actions | +| Windows | AppVeyor¹ / Travis CI | Azure Pipelines | | GitHub Actions | > ¹ AppVeyor only runs the "basic" test to reduce load. -Non-x86 architectures are covered on Travis CI using Python 3.6. +Non-x86 architectures are covered on Travis CI using Python 3.7. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 56131899b..f8142ce80 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,17 +20,6 @@ jobs: python -m pip install -e ".[dev]" pytest-azurepipelines python ./bin/run_tests.py -- job: windows_36 - pool: {vmImage: 'windows-2019'} - timeoutInMinutes: 180 - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - - bash: | - python -m pip install -e ".[dev]" pytest-azurepipelines - python ./bin/run_tests.py - - job: windows_38 pool: {vmImage: 'windows-2019'} timeoutInMinutes: 180 diff --git a/bin/update_dependencies.py b/bin/update_dependencies.py index 69e62cfaa..9dc9f5369 100755 --- a/bin/update_dependencies.py +++ b/bin/update_dependencies.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# This file supports 3.6+ import os import shutil diff --git a/cibuildwheel/bashlex_eval.py b/cibuildwheel/bashlex_eval.py index a8b4691c3..cd1fa563c 100644 --- a/cibuildwheel/bashlex_eval.py +++ b/cibuildwheel/bashlex_eval.py @@ -9,9 +9,7 @@ def local_environment_executor(command: List[str], env: Dict[str, str]) -> str: - return subprocess.run( - command, env=env, universal_newlines=True, stdout=subprocess.PIPE, check=True - ).stdout + return subprocess.run(command, env=env, text=True, stdout=subprocess.PIPE, check=True).stdout @dataclass(frozen=True) diff --git a/docs/contributing.md b/docs/contributing.md index c6a5b9308..24566e4e4 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -94,7 +94,6 @@ This has been moved to using docker, so you only need the following instructions The dependency update script in the next section requires multiple python versions installed. One way to do this is to use `pyenv`: ```bash -pyenv install 3.6.11 pyenv install 3.7.8 # Optionally add 3.8 and make it the local version; # otherwise assuming 3.8+ already is your current python version @@ -103,7 +102,6 @@ pyenv install 3.7.8 Then, you need to make the required virtual environments: ```bash -$(pyenv prefix 3.6.11)/bin/python -m venv env36 $(pyenv prefix 3.7.8)/bin/python -m venv env37 ``` diff --git a/examples/circleci-minimal.yml b/examples/circleci-minimal.yml index d8ebea728..3162ceb55 100644 --- a/examples/circleci-minimal.yml +++ b/examples/circleci-minimal.yml @@ -4,7 +4,7 @@ jobs: linux-wheels: working_directory: ~/linux-wheels docker: - - image: circleci/python:3.6 + - image: circleci/python:3.9 steps: - checkout - setup_remote_docker diff --git a/examples/travis-ci-test-and-deploy.yml b/examples/travis-ci-test-and-deploy.yml index 837db2ebc..42a27954c 100644 --- a/examples/travis-ci-test-and-deploy.yml +++ b/examples/travis-ci-test-and-deploy.yml @@ -9,7 +9,6 @@ os: linux dist: focal language: python python: - - 3.6 - 3.7 - 3.8 diff --git a/pyproject.toml b/pyproject.toml index 40f8dc5a6..6c78cdb09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 100 -target-version = ['py36', 'py37', 'py38', 'py39', 'py310'] +target-version = ['py37', 'py38', 'py39', 'py310'] [tool.isort] @@ -88,7 +88,7 @@ ignore = [ ] [tool.pylint] -master.py-version = "3.6" +master.py-version = "3.7" master.jobs = "0" master.fail-on = ["E", "F"] master.fail-under = "9.8" diff --git a/setup.cfg b/setup.cfg index 2efc7c51f..51718be98 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,6 @@ classifiers = Natural Language :: English Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 @@ -37,10 +36,9 @@ install_requires = filelock packaging>=20.9 platformdirs - dataclasses;python_version < '3.7' tomli;python_version < '3.11' typing-extensions>=3.10.0.0;python_version < '3.8' -python_requires = >=3.6 +python_requires = >=3.7 include_package_data = True zip_safe = False diff --git a/test/test_macos_archs.py b/test/test_macos_archs.py index a5db09f8d..a85a6b245 100644 --- a/test/test_macos_archs.py +++ b/test/test_macos_archs.py @@ -17,7 +17,7 @@ def get_xcode_version() -> Tuple[int, int]: output = subprocess.run( ["xcodebuild", "-version"], - universal_newlines=True, + text=True, check=True, stdout=subprocess.PIPE, ).stdout diff --git a/test/utils.py b/test/utils.py index 22fe4c1a8..ebe682e37 100644 --- a/test/utils.py +++ b/test/utils.py @@ -35,7 +35,7 @@ def cibuildwheel_get_build_identifiers(project_path, env=None, *, prerelease_pyt cmd_output = subprocess.run( cmd, - universal_newlines=True, + text=True, env=env, check=True, stdout=subprocess.PIPE, diff --git a/unit_test/oci_container_test.py b/unit_test/oci_container_test.py index 2f425daf0..05ef24fd1 100644 --- a/unit_test/oci_container_test.py +++ b/unit_test/oci_container_test.py @@ -83,7 +83,7 @@ def test_container_removed(container_engine): shell=True, check=True, stdout=subprocess.PIPE, - universal_newlines=True, + text=True, ).stdout assert container.name is not None assert container.name in docker_containers_listing @@ -94,7 +94,7 @@ def test_container_removed(container_engine): shell=True, check=True, stdout=subprocess.PIPE, - universal_newlines=True, + text=True, ).stdout assert old_container_name not in docker_containers_listing From 054230e01ba8d090357f90092eda0078448b0da3 Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 14 Jul 2022 15:23:59 +0200 Subject: [PATCH 02/28] fix: test_build_default_launches to use an empty package dir test_build_default_launches was using cibuildwheel setup.cfg which led to the test failing once python 3.6 was dropped. Use an empty package, provided by fake_package_dir, to run the test. --- unit_test/conftest.py | 4 +++- unit_test/option_prepare_test.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unit_test/conftest.py b/unit_test/conftest.py index cbfdbb723..3d98c30b0 100644 --- a/unit_test/conftest.py +++ b/unit_test/conftest.py @@ -12,7 +12,7 @@ def pytest_addoption(parser): @pytest.fixture -def fake_package_dir(monkeypatch): +def fake_package_dir(tmp_path, monkeypatch): """ Monkey-patch enough for the main() function to run """ @@ -25,6 +25,8 @@ def mock_path_exists(path): return real_path_exists(path) args = ["cibuildwheel", str(MOCK_PACKAGE_DIR)] + tmp_path.joinpath(MOCK_PACKAGE_DIR).mkdir() monkeypatch.setattr(Path, "exists", mock_path_exists) monkeypatch.setattr(sys, "argv", args) + monkeypatch.chdir(tmp_path) return args diff --git a/unit_test/option_prepare_test.py b/unit_test/option_prepare_test.py index 10bca4329..3eef68a77 100644 --- a/unit_test/option_prepare_test.py +++ b/unit_test/option_prepare_test.py @@ -44,7 +44,7 @@ def ignore_context_call(*args, **kwargs): def test_build_default_launches(mock_build_container, fake_package_dir, monkeypatch): - monkeypatch.setattr(sys, "argv", ["cibuildwheel", "--platform=linux"]) + monkeypatch.setattr(sys, "argv", sys.argv + ["--platform=linux"]) main() From 6d27f05c7cc57786febc4eb5894ef27ef078ee0e Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 14 Jul 2022 13:36:57 +0200 Subject: [PATCH 03/28] chore: use `from __future__ import annotations` --- .pre-commit-config.yaml | 3 + bin/run_tests.py | 2 + bin/update_dependencies.py | 2 + bin/update_readme_changelog.py | 2 + cibuildwheel/__init__.py | 2 + cibuildwheel/__main__.py | 21 ++--- cibuildwheel/architecture.py | 15 ++-- cibuildwheel/bashlex_eval.py | 12 +-- cibuildwheel/environment.py | 20 ++--- cibuildwheel/extra.py | 5 +- cibuildwheel/functools_cached_property_38.py | 14 ++-- cibuildwheel/linux.py | 20 ++--- cibuildwheel/logger.py | 20 ++--- cibuildwheel/macos.py | 18 +++-- cibuildwheel/oci_container.py | 26 +++--- cibuildwheel/options.py | 81 +++++++++---------- cibuildwheel/projectfiles.py | 10 ++- cibuildwheel/typing.py | 4 +- cibuildwheel/util.py | 48 +++++------ cibuildwheel/windows.py | 16 ++-- docs/main.py | 2 + noxfile.py | 2 + setup.py | 2 + test/conftest.py | 4 +- test/test_0_basic.py | 2 + test/test_abi_variants.py | 2 + test/test_before_all.py | 2 + test/test_before_build.py | 2 + test/test_before_test.py | 2 + test/test_build_skip.py | 2 + test/test_container_images.py | 2 + test/test_cpp_standards.py | 2 + test/test_dependency_versions.py | 2 + test/test_emulation.py | 2 + test/test_environment.py | 2 + test/test_from_sdist.py | 2 + test/test_macos_archs.py | 5 +- test/test_manylinuxXXXX_only.py | 2 + test/test_pep518.py | 2 + test/test_podman.py | 2 + test/test_projects/__init__.py | 2 + test/test_projects/__main__.py | 2 + test/test_projects/base.py | 2 + test/test_projects/c.py | 2 + test/test_pure_wheel.py | 2 + test/test_same_wheel.py | 2 + test/test_ssl.py | 2 + test/test_subdir_package.py | 2 + test/test_testing.py | 2 + test/test_troubleshooting.py | 2 + test/test_wheel_tag.py | 2 + test/utils.py | 2 + unit_test/build_ids_test.py | 5 +- unit_test/build_selector_test.py | 2 + unit_test/conftest.py | 2 + unit_test/dependency_constraints_test.py | 2 + unit_test/download_test.py | 2 + unit_test/environment_test.py | 2 + unit_test/linux_build_steps_test.py | 2 + unit_test/main_tests/conftest.py | 2 + unit_test/main_tests/main_options_test.py | 2 + unit_test/main_tests/main_platform_test.py | 2 + .../main_tests/main_requires_python_test.py | 2 + unit_test/oci_container_test.py | 2 + unit_test/option_prepare_test.py | 2 + unit_test/options_test.py | 2 + unit_test/options_toml_test.py | 2 + unit_test/projectfiles_test.py | 2 + unit_test/utils.py | 2 + unit_test/utils_test.py | 2 + unit_test/wheel_print_test.py | 2 + 71 files changed, 285 insertions(+), 166 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 388640192..271c1019f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,7 @@ repos: hooks: - id: pyupgrade args: ["--py37-plus"] + exclude: ^cibuildwheel/resources/.*py$ # Autoremoves unused imports - repo: https://github.com/hadialqattan/pycln @@ -31,6 +32,8 @@ repos: rev: 5.10.1 hooks: - id: isort + args: ["-a", "from __future__ import annotations"] + exclude: ^cibuildwheel/resources/.*py$ - repo: https://github.com/psf/black rev: 22.6.0 diff --git a/bin/run_tests.py b/bin/run_tests.py index 82e193c35..583d13c7a 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +from __future__ import annotations + import argparse import os import subprocess diff --git a/bin/update_dependencies.py b/bin/update_dependencies.py index 9dc9f5369..c0d7f2007 100755 --- a/bin/update_dependencies.py +++ b/bin/update_dependencies.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +from __future__ import annotations + import os import shutil import subprocess diff --git a/bin/update_readme_changelog.py b/bin/update_readme_changelog.py index 90b2ffd8b..4a4625ff5 100755 --- a/bin/update_readme_changelog.py +++ b/bin/update_readme_changelog.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +from __future__ import annotations + import re import sys from pathlib import Path diff --git a/cibuildwheel/__init__.py b/cibuildwheel/__init__.py index b4066b65a..b923f2287 100644 --- a/cibuildwheel/__init__.py +++ b/cibuildwheel/__init__.py @@ -1 +1,3 @@ +from __future__ import annotations + __version__ = "2.8.1" diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index a3b7711f7..034673a20 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import argparse import os import shutil @@ -7,7 +9,6 @@ import textwrap from pathlib import Path from tempfile import mkdtemp -from typing import List, Set, Union import cibuildwheel import cibuildwheel.linux @@ -257,7 +258,7 @@ def build_in_directory(args: CommandLineArguments) -> None: log.warning(f"Can't delete temporary folder '{str(tmp_path)}'") -def print_preamble(platform: str, options: Options, identifiers: List[str]) -> None: +def print_preamble(platform: str, options: Options, identifiers: list[str]) -> None: print( textwrap.dedent( """ @@ -287,13 +288,13 @@ def print_preamble(platform: str, options: Options, identifiers: List[str]) -> N def get_build_identifiers( - platform: PlatformName, build_selector: BuildSelector, architectures: Set[Architecture] -) -> List[str]: - python_configurations: Union[ - List[cibuildwheel.linux.PythonConfiguration], - List[cibuildwheel.windows.PythonConfiguration], - List[cibuildwheel.macos.PythonConfiguration], - ] + platform: PlatformName, build_selector: BuildSelector, architectures: set[Architecture] +) -> list[str]: + python_configurations: ( + list[cibuildwheel.linux.PythonConfiguration] + | list[cibuildwheel.windows.PythonConfiguration] + | list[cibuildwheel.macos.PythonConfiguration] + ) if platform == "linux": python_configurations = cibuildwheel.linux.get_python_configurations( @@ -313,7 +314,7 @@ def get_build_identifiers( return [config.identifier for config in python_configurations] -def detect_warnings(*, options: Options, identifiers: List[str]) -> List[str]: +def detect_warnings(*, options: Options, identifiers: list[str]) -> list[str]: warnings = [] # warn about deprecated {python} and {pip} diff --git a/cibuildwheel/architecture.py b/cibuildwheel/architecture.py index be87f3219..82a78b30b 100644 --- a/cibuildwheel/architecture.py +++ b/cibuildwheel/architecture.py @@ -1,8 +1,9 @@ +from __future__ import annotations + import functools import platform as platform_module import re from enum import Enum -from typing import Set from .typing import Final, Literal, PlatformName, assert_never @@ -32,11 +33,11 @@ class Architecture(Enum): ARM64 = "ARM64" # Allow this to be sorted - def __lt__(self, other: "Architecture") -> bool: + def __lt__(self, other: Architecture) -> bool: return self.value < other.value @staticmethod - def parse_config(config: str, platform: PlatformName) -> "Set[Architecture]": + def parse_config(config: str, platform: PlatformName) -> set[Architecture]: result = set() for arch_str in re.split(r"[\s,]+", config): if arch_str == "auto": @@ -54,7 +55,7 @@ def parse_config(config: str, platform: PlatformName) -> "Set[Architecture]": return result @staticmethod - def auto_archs(platform: PlatformName) -> "Set[Architecture]": + def auto_archs(platform: PlatformName) -> set[Architecture]: native_architecture = Architecture(platform_module.machine()) result = {native_architecture} @@ -72,7 +73,7 @@ def auto_archs(platform: PlatformName) -> "Set[Architecture]": return result @staticmethod - def all_archs(platform: PlatformName) -> "Set[Architecture]": + def all_archs(platform: PlatformName) -> set[Architecture]: all_archs_map = { "linux": { Architecture.x86_64, @@ -87,7 +88,7 @@ def all_archs(platform: PlatformName) -> "Set[Architecture]": return all_archs_map[platform] @staticmethod - def bitness_archs(platform: PlatformName, bitness: Literal["64", "32"]) -> "Set[Architecture]": + def bitness_archs(platform: PlatformName, bitness: Literal["64", "32"]) -> set[Architecture]: archs_32 = {Architecture.i686, Architecture.x86} auto_archs = Architecture.auto_archs(platform) @@ -101,7 +102,7 @@ def bitness_archs(platform: PlatformName, bitness: Literal["64", "32"]) -> "Set[ def allowed_architectures_check( platform: PlatformName, - architectures: Set[Architecture], + architectures: set[Architecture], ) -> None: allowed_architectures = Architecture.all_archs(platform) diff --git a/cibuildwheel/bashlex_eval.py b/cibuildwheel/bashlex_eval.py index cd1fa563c..47e4aea3a 100644 --- a/cibuildwheel/bashlex_eval.py +++ b/cibuildwheel/bashlex_eval.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import subprocess from dataclasses import dataclass -from typing import Callable, Dict, List, Optional, Sequence +from typing import Callable, Dict, List, Sequence import bashlex @@ -8,19 +10,19 @@ EnvironmentExecutor = Callable[[List[str], Dict[str, str]], str] -def local_environment_executor(command: List[str], env: Dict[str, str]) -> str: +def local_environment_executor(command: list[str], env: dict[str, str]) -> str: return subprocess.run(command, env=env, text=True, stdout=subprocess.PIPE, check=True).stdout @dataclass(frozen=True) class NodeExecutionContext: - environment: Dict[str, str] + environment: dict[str, str] input: str executor: EnvironmentExecutor def evaluate( - value: str, environment: Dict[str, str], executor: Optional[EnvironmentExecutor] = None + value: str, environment: dict[str, str], executor: EnvironmentExecutor | None = None ) -> str: if not value: # empty string evaluates to empty string @@ -101,7 +103,7 @@ def evaluate_nodes_as_compound_command( def evaluate_nodes_as_simple_command( - nodes: List[bashlex.ast.node], context: NodeExecutionContext + nodes: list[bashlex.ast.node], context: NodeExecutionContext ) -> str: command = [evaluate_node(part, context=context) for part in nodes] return context.executor(command, context.environment) diff --git a/cibuildwheel/environment.py b/cibuildwheel/environment.py index 3bf982d29..a544852a2 100644 --- a/cibuildwheel/environment.py +++ b/cibuildwheel/environment.py @@ -1,5 +1,7 @@ +from __future__ import annotations + import dataclasses -from typing import Any, Dict, List, Mapping, Optional, Sequence +from typing import Any, Mapping, Sequence import bashlex @@ -12,7 +14,7 @@ class EnvironmentParseError(Exception): pass -def split_env_items(env_string: str) -> List[str]: +def split_env_items(env_string: str) -> list[str]: """Splits space-separated variable assignments into a list of individual assignments. >>> split_env_items('VAR=abc') @@ -47,8 +49,8 @@ class EnvironmentAssignment(Protocol): def evaluated_value( self, *, - environment: Dict[str, str], - executor: Optional[bashlex_eval.EnvironmentExecutor] = None, + environment: dict[str, str], + executor: bashlex_eval.EnvironmentExecutor | None = None, ) -> str: """Returns the value of this assignment, as evaluated in the environment""" @@ -84,8 +86,8 @@ def __init__(self, assignment: str): def evaluated_value( self, - environment: Dict[str, str], - executor: Optional[bashlex_eval.EnvironmentExecutor] = None, + environment: dict[str, str], + executor: bashlex_eval.EnvironmentExecutor | None = None, ) -> str: return bashlex_eval.evaluate(self.value, environment=environment, executor=executor) @@ -100,7 +102,7 @@ def __eq__(self, other: object) -> bool: @dataclasses.dataclass class ParsedEnvironment: - assignments: List[EnvironmentAssignment] + assignments: list[EnvironmentAssignment] def __init__(self, assignments: Sequence[EnvironmentAssignment]) -> None: self.assignments = list(assignments) @@ -108,8 +110,8 @@ def __init__(self, assignments: Sequence[EnvironmentAssignment]) -> None: def as_dictionary( self, prev_environment: Mapping[str, str], - executor: Optional[bashlex_eval.EnvironmentExecutor] = None, - ) -> Dict[str, str]: + executor: bashlex_eval.EnvironmentExecutor | None = None, + ) -> dict[str, str]: environment = dict(**prev_environment) for assignment in self.assignments: diff --git a/cibuildwheel/extra.py b/cibuildwheel/extra.py index 60eecbad2..36389e6f7 100644 --- a/cibuildwheel/extra.py +++ b/cibuildwheel/extra.py @@ -2,8 +2,9 @@ These are utilities for the `/bin` scripts, not for the `cibuildwheel` program. """ +from __future__ import annotations + from io import StringIO -from typing import Dict, List from .typing import Protocol @@ -15,7 +16,7 @@ def __str__(self) -> str: ... -def dump_python_configurations(inp: Dict[str, Dict[str, List[Dict[str, Printable]]]]) -> str: +def dump_python_configurations(inp: dict[str, dict[str, list[dict[str, Printable]]]]) -> str: output = StringIO() for header, values in inp.items(): output.write(f"[{header}]\n") diff --git a/cibuildwheel/functools_cached_property_38.py b/cibuildwheel/functools_cached_property_38.py index e1c45ac26..cbe4537af 100644 --- a/cibuildwheel/functools_cached_property_38.py +++ b/cibuildwheel/functools_cached_property_38.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from threading import RLock -from typing import Any, Callable, Generic, Optional, Type, TypeVar, overload +from typing import Any, Callable, Generic, TypeVar, overload __all__ = ["cached_property"] @@ -11,11 +13,11 @@ class cached_property(Generic[_T]): def __init__(self, func: Callable[[Any], _T]): self.func = func - self.attrname: Optional[str] = None + self.attrname: str | None = None self.__doc__ = func.__doc__ self.lock = RLock() - def __set_name__(self, owner: Type[Any], name: str) -> None: + def __set_name__(self, owner: type[Any], name: str) -> None: if self.attrname is None: self.attrname = name elif name != self.attrname: @@ -25,14 +27,14 @@ def __set_name__(self, owner: Type[Any], name: str) -> None: ) @overload - def __get__(self, instance: None, owner: Optional[Type[Any]] = ...) -> "cached_property[_T]": + def __get__(self, instance: None, owner: type[Any] | None = ...) -> cached_property[_T]: ... @overload - def __get__(self, instance: object, owner: Optional[Type[Any]] = ...) -> _T: + def __get__(self, instance: object, owner: type[Any] | None = ...) -> _T: ... - def __get__(self, instance: Optional[object], owner: Optional[Type[Any]] = None) -> Any: + def __get__(self, instance: object | None, owner: type[Any] | None = None) -> Any: if instance is None: return self if self.attrname is None: diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 57a7deee1..2a0ec43f8 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -1,9 +1,11 @@ +from __future__ import annotations + import subprocess import sys import textwrap from dataclasses import dataclass from pathlib import Path, PurePath, PurePosixPath -from typing import Iterator, List, Set, Tuple +from typing import Iterator, Tuple from .architecture import Architecture from .logger import log @@ -35,15 +37,15 @@ def path(self) -> PurePosixPath: @dataclass(frozen=True) class BuildStep: - platform_configs: List[PythonConfiguration] + platform_configs: list[PythonConfiguration] platform_tag: str container_image: str def get_python_configurations( build_selector: BuildSelector, - architectures: Set[Architecture], -) -> List[PythonConfiguration]: + architectures: set[Architecture], +) -> list[PythonConfiguration]: full_python_configs = read_python_configs("linux") @@ -79,7 +81,7 @@ def container_image_for_python_configuration(config: PythonConfiguration, option def get_build_steps( - options: Options, python_configurations: List[PythonConfiguration] + options: Options, python_configurations: list[PythonConfiguration] ) -> Iterator[BuildStep]: """ Groups PythonConfigurations into BuildSteps. Each BuildStep represents a @@ -110,7 +112,7 @@ def get_build_steps( def build_in_container( *, options: Options, - platform_configs: List[PythonConfiguration], + platform_configs: list[PythonConfiguration], container: OCIContainer, container_project_path: PurePath, container_package_dir: PurePath, @@ -140,13 +142,13 @@ def build_in_container( ) container.call(["sh", "-c", before_all_prepared], env=env) - built_wheels: List[PurePosixPath] = [] + built_wheels: list[PurePosixPath] = [] for config in platform_configs: log.build_start(config.identifier) build_options = options.build_options(config.identifier) - dependency_constraint_flags: List[PathOrStr] = [] + dependency_constraint_flags: list[PathOrStr] = [] if build_options.dependency_constraints: constraints_file = build_options.dependency_constraints.get_for_python_version( @@ -395,7 +397,7 @@ def build(options: Options, tmp_path: Path) -> None: # pylint: disable=unused-a sys.exit(1) -def _matches_prepared_command(error_cmd: List[str], command_template: str) -> bool: +def _matches_prepared_command(error_cmd: list[str], command_template: str) -> bool: if len(error_cmd) < 3 or error_cmd[0:2] != ["sh", "-c"]: return False command_prefix = command_template.split("{", maxsplit=1)[0].strip() diff --git a/cibuildwheel/logger.py b/cibuildwheel/logger.py index 0a4be14d2..6f408b474 100644 --- a/cibuildwheel/logger.py +++ b/cibuildwheel/logger.py @@ -1,9 +1,11 @@ +from __future__ import annotations + import codecs import os import re import sys import time -from typing import IO, AnyStr, Optional, Union +from typing import IO, AnyStr from cibuildwheel.typing import Final from cibuildwheel.util import CIProvider, detect_ci_provider @@ -39,10 +41,10 @@ class Logger: fold_mode: str colors_enabled: bool unicode_enabled: bool - active_build_identifier: Optional[str] = None - build_start_time: Optional[float] = None - step_start_time: Optional[float] = None - active_fold_group_name: Optional[str] = None + active_build_identifier: str | None = None + build_start_time: float | None = None + step_start_time: float | None = None + active_fold_group_name: str | None = None def __init__(self) -> None: if sys.platform == "win32" and hasattr(sys.stdout, "reconfigure"): @@ -120,7 +122,7 @@ def step_end(self, success: bool = True) -> None: self.step_start_time = None - def step_end_with_error(self, error: Union[BaseException, str]) -> None: + def step_end_with_error(self, error: BaseException | str) -> None: self.step_end(success=False) self.error(error) @@ -131,7 +133,7 @@ def warning(self, message: str) -> None: c = self.colors print(f"{c.yellow}Warning{c.end}: {message}\n", file=sys.stderr) - def error(self, error: Union[BaseException, str]) -> None: + def error(self, error: BaseException | str) -> None: if self.fold_mode == "github": print(f"::error::{error}\n", file=sys.stderr) else: @@ -174,11 +176,11 @@ def _fold_group_identifier(name: str) -> str: return identifier.lower()[:20] @property - def colors(self) -> "Colors": + def colors(self) -> Colors: return Colors(enabled=self.colors_enabled) @property - def symbols(self) -> "Symbols": + def symbols(self) -> Symbols: return Symbols(unicode=self.unicode_enabled) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index beb4d32ea..6d56be20f 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import functools import os import platform @@ -7,7 +9,7 @@ import sys from dataclasses import dataclass from pathlib import Path -from typing import Dict, List, Sequence, Set, Tuple, cast +from typing import Sequence, Tuple, cast from filelock import FileLock @@ -37,7 +39,7 @@ ) -def get_macos_version() -> Tuple[int, int]: +def get_macos_version() -> tuple[int, int]: """ Returns the macOS major/minor version, as a tuple, e.g. (10, 15) or (11, 0) @@ -51,7 +53,7 @@ def get_macos_version() -> Tuple[int, int]: return cast(Tuple[int, int], version) -def get_macos_sdks() -> List[str]: +def get_macos_sdks() -> list[str]: output = call("xcodebuild", "-showsdks", capture_stdout=True) return [m.group(1) for m in re.finditer(r"-sdk (macosx\S+)", output)] @@ -64,8 +66,8 @@ class PythonConfiguration: def get_python_configurations( - build_selector: BuildSelector, architectures: Set[Architecture] -) -> List[PythonConfiguration]: + build_selector: BuildSelector, architectures: set[Architecture] +) -> list[PythonConfiguration]: full_python_configs = read_python_configs("macos") @@ -134,7 +136,7 @@ def setup_python( dependency_constraint_flags: Sequence[PathOrStr], environment: ParsedEnvironment, build_frontend: BuildFrontend, -) -> Dict[str, str]: +) -> dict[str, str]: tmp.mkdir() implementation_id = python_configuration.identifier.split("-")[0] log.step(f"Installing Python {implementation_id}...") @@ -295,7 +297,7 @@ def build(options: Options, tmp_path: Path) -> None: ) shell(before_all_prepared, env=env) - built_wheels: List[Path] = [] + built_wheels: list[Path] = [] for config in python_configurations: build_options = options.build_options(config.identifier) @@ -418,7 +420,7 @@ def build(options: Options, tmp_path: Path) -> None: if build_options.test_command and build_options.test_selector(config.identifier): machine_arch = platform.machine() - testing_archs: List[Literal["x86_64", "arm64"]] + testing_archs: list[Literal["x86_64", "arm64"]] if config_is_arm64: testing_archs = ["arm64"] diff --git a/cibuildwheel/oci_container.py b/cibuildwheel/oci_container.py index c02f76788..91714c7e1 100644 --- a/cibuildwheel/oci_container.py +++ b/cibuildwheel/oci_container.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import io import json import os @@ -9,7 +11,7 @@ import uuid from pathlib import Path, PurePath, PurePosixPath from types import TracebackType -from typing import IO, Dict, List, Optional, Sequence, Type, cast +from typing import IO, Dict, Sequence, cast from cibuildwheel.util import CIProvider, detect_ci_provider @@ -52,7 +54,7 @@ def __init__( *, image: str, simulate_32_bit: bool = False, - cwd: Optional[PathOrStr] = None, + cwd: PathOrStr | None = None, engine: ContainerEngine = "docker", ): if not image: @@ -61,10 +63,10 @@ def __init__( self.image = image self.simulate_32_bit = simulate_32_bit self.cwd = cwd - self.name: Optional[str] = None + self.name: str | None = None self.engine = engine - def __enter__(self) -> "OCIContainer": + def __enter__(self) -> OCIContainer: self.name = f"cibuildwheel-{uuid.uuid4()}" @@ -122,9 +124,9 @@ def __enter__(self) -> "OCIContainer": def __exit__( self, - exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType], + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, ) -> None: self.bash_stdin.write(b"exit 0\n") @@ -217,7 +219,7 @@ def copy_out(self, from_path: PurePath, to_path: Path) -> None: else: raise KeyError(self.engine) - def glob(self, path: PurePosixPath, pattern: str) -> List[PurePosixPath]: + def glob(self, path: PurePosixPath, pattern: str) -> list[PurePosixPath]: glob_pattern = path.joinpath(pattern) path_strings = json.loads( @@ -236,9 +238,9 @@ def glob(self, path: PurePosixPath, pattern: str) -> List[PurePosixPath]: def call( self, args: Sequence[PathOrStr], - env: Optional[Dict[str, str]] = None, + env: dict[str, str] | None = None, capture_output: bool = False, - cwd: Optional[PathOrStr] = None, + cwd: PathOrStr | None = None, ) -> str: if cwd is None: @@ -314,7 +316,7 @@ def call( return output - def get_environment(self) -> Dict[str, str]: + def get_environment(self) -> dict[str, str]: env = json.loads( self.call( [ @@ -327,7 +329,7 @@ def get_environment(self) -> Dict[str, str]: ) return cast(Dict[str, str], env) - def environment_executor(self, command: List[str], environment: Dict[str, str]) -> str: + def environment_executor(self, command: list[str], environment: dict[str, str]) -> str: # used as an EnvironmentExecutor to evaluate commands and capture output return self.call(command, env=environment, capture_output=True) diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index 59ff12269..308036042 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import functools import os import sys @@ -6,18 +8,7 @@ from contextlib import contextmanager from dataclasses import asdict, dataclass from pathlib import Path -from typing import ( - Any, - Dict, - Generator, - List, - Mapping, - Optional, - Set, - Tuple, - Union, - cast, -) +from typing import Any, Dict, Generator, List, Mapping, Union, cast if sys.version_info >= (3, 11): import tomllib @@ -50,7 +41,7 @@ @dataclass class CommandLineArguments: platform: Literal["auto", "linux", "macos", "windows"] - archs: Optional[str] + archs: str | None output_dir: Path config_file: str package_dir: Path @@ -65,7 +56,7 @@ class GlobalOptions: output_dir: Path build_selector: BuildSelector test_selector: TestSelector - architectures: Set[Architecture] + architectures: set[Architecture] container_engine: ContainerEngine @@ -74,14 +65,14 @@ class BuildOptions: globals: GlobalOptions environment: ParsedEnvironment before_all: str - before_build: Optional[str] + before_build: str | None repair_command: str - manylinux_images: Optional[Dict[str, str]] - musllinux_images: Optional[Dict[str, str]] - dependency_constraints: Optional[DependencyConstraints] - test_command: Optional[str] - before_test: Optional[str] - test_requires: List[str] + manylinux_images: dict[str, str] | None + musllinux_images: dict[str, str] | None + dependency_constraints: DependencyConstraints | None + test_command: str | None + before_test: str | None + test_requires: list[str] test_extras: str build_verbosity: int build_frontend: BuildFrontend @@ -103,7 +94,7 @@ def test_selector(self) -> TestSelector: return self.globals.test_selector @property - def architectures(self) -> Set[Architecture]: + def architectures(self) -> set[Architecture]: return self.globals.architectures @@ -113,7 +104,7 @@ def architectures(self) -> Set[Architecture]: @dataclass(frozen=True) class Override: select_pattern: str - options: Dict[str, Setting] + options: dict[str, Setting] MANYLINUX_OPTIONS = {f"manylinux-{build_platform}-image" for build_platform in MANYLINUX_ARCHS} @@ -134,7 +125,7 @@ class ConfigOptionError(KeyError): pass -def _dig_first(*pairs: Tuple[Mapping[str, Setting], str], ignore_empty: bool = False) -> Setting: +def _dig_first(*pairs: tuple[Mapping[str, Setting], str], ignore_empty: bool = False) -> Setting: """ Return the first dict item that matches from pairs of dicts and keys. Will throw a KeyError if missing. @@ -176,10 +167,10 @@ class OptionsReader: def __init__( self, - config_file_path: Optional[Path] = None, + config_file_path: Path | None = None, *, platform: PlatformName, - disallow: Optional[Dict[str, Set[str]]] = None, + disallow: dict[str, set[str]] | None = None, ) -> None: self.platform = platform self.disallow = disallow or {} @@ -189,8 +180,8 @@ def __init__( self.default_options, self.default_platform_options = self._load_file(defaults_path) # Load the project config file - config_options: Dict[str, Any] = {} - config_platform_options: Dict[str, Any] = {} + config_options: dict[str, Any] = {} + config_platform_options: dict[str, Any] = {} if config_file_path is not None: config_options, config_platform_options = self._load_file(config_file_path) @@ -209,8 +200,8 @@ def __init__( self.config_options = config_options self.config_platform_options = config_platform_options - self.overrides: List[Override] = [] - self.current_identifier: Optional[str] = None + self.overrides: list[Override] = [] + self.current_identifier: str | None = None config_overrides = self.config_options.get("overrides") @@ -251,7 +242,7 @@ def _is_valid_platform_option(self, name: str) -> bool: return name in allowed_option_names - def _load_file(self, filename: Path) -> Tuple[Dict[str, Any], Dict[str, Any]]: + def _load_file(self, filename: Path) -> tuple[dict[str, Any], dict[str, Any]]: """ Load a toml file, returns global and platform as separate dicts. """ @@ -264,7 +255,7 @@ def _load_file(self, filename: Path) -> Tuple[Dict[str, Any], Dict[str, Any]]: return global_options, platform_options @property - def active_config_overrides(self) -> List[Override]: + def active_config_overrides(self) -> list[Override]: if self.current_identifier is None: return [] return [ @@ -272,7 +263,7 @@ def active_config_overrides(self) -> List[Override]: ] @contextmanager - def identifier(self, identifier: Optional[str]) -> Generator[None, None, None]: + def identifier(self, identifier: str | None) -> Generator[None, None, None]: self.current_identifier = identifier try: yield @@ -284,8 +275,8 @@ def get( name: str, *, env_plat: bool = True, - sep: Optional[str] = None, - table: Optional[TableFmt] = None, + sep: str | None = None, + table: TableFmt | None = None, ignore_empty: bool = False, ) -> str: """ @@ -349,7 +340,7 @@ def __init__(self, platform: PlatformName, command_line_arguments: CommandLineAr ) @property - def config_file_path(self) -> Optional[Path]: + def config_file_path(self) -> Path | None: args = self.command_line_arguments if args.config_file: @@ -363,7 +354,7 @@ def config_file_path(self) -> Optional[Path]: return None @cached_property - def package_requires_python_str(self) -> Optional[str]: + def package_requires_python_str(self) -> str | None: args = self.command_line_arguments return get_requires_python_str(Path(args.package_dir)) @@ -383,7 +374,7 @@ def globals(self) -> GlobalOptions: # This is not supported in tool.cibuildwheel, as it comes from a standard location. # Passing this in as an environment variable will override pyproject.toml, setup.cfg, or setup.py - requires_python_str: Optional[str] = ( + requires_python_str: str | None = ( os.environ.get("CIBW_PROJECT_REQUIRES_PYTHON") or self.package_requires_python_str ) requires_python = None if requires_python_str is None else SpecifierSet(requires_python_str) @@ -417,7 +408,7 @@ def globals(self) -> GlobalOptions: container_engine=container_engine, ) - def build_options(self, identifier: Optional[str]) -> BuildOptions: + def build_options(self, identifier: str | None) -> BuildOptions: """ Compute BuildOptions for a single run configuration. """ @@ -469,9 +460,9 @@ def build_options(self, identifier: Optional[str]) -> BuildOptions: pass if dependency_versions == "pinned": - dependency_constraints: Optional[ + dependency_constraints: None | ( DependencyConstraints - ] = DependencyConstraints.with_defaults() + ) = DependencyConstraints.with_defaults() elif dependency_versions == "latest": dependency_constraints = None else: @@ -486,8 +477,8 @@ def build_options(self, identifier: Optional[str]) -> BuildOptions: except ValueError: build_verbosity = 0 - manylinux_images: Dict[str, str] = {} - musllinux_images: Dict[str, str] = {} + manylinux_images: dict[str, str] = {} + musllinux_images: dict[str, str] = {} if self.platform == "linux": all_pinned_container_images = _get_pinned_container_images() @@ -539,7 +530,7 @@ def build_options(self, identifier: Optional[str]) -> BuildOptions: build_frontend=build_frontend, ) - def check_for_invalid_configuration(self, identifiers: List[str]) -> None: + def check_for_invalid_configuration(self, identifiers: list[str]) -> None: if self.platform in ["macos", "windows"]: before_all_values = {self.build_options(i).before_all for i in identifiers} @@ -562,7 +553,7 @@ def check_for_deprecated_options(self) -> None: deprecated_selectors("CIBW_SKIP", build_selector.skip_config) deprecated_selectors("CIBW_TEST_SKIP", test_selector.skip_config) - def summary(self, identifiers: List[str]) -> str: + def summary(self, identifiers: list[str]) -> str: lines = [ f"{option_name}: {option_value!r}" for option_name, option_value in sorted(asdict(self.globals).items()) diff --git a/cibuildwheel/projectfiles.py b/cibuildwheel/projectfiles.py index 90d388f6b..b5c3cbdf2 100644 --- a/cibuildwheel/projectfiles.py +++ b/cibuildwheel/projectfiles.py @@ -1,8 +1,10 @@ +from __future__ import annotations + import ast import sys from configparser import ConfigParser from pathlib import Path -from typing import Any, Optional +from typing import Any if sys.version_info >= (3, 11): import tomllib @@ -24,7 +26,7 @@ def get_constant(x: ast.Constant) -> Any: class Analyzer(ast.NodeVisitor): def __init__(self) -> None: - self.requires_python: Optional[str] = None + self.requires_python: str | None = None def visit(self, node: ast.AST) -> None: for inner_node in ast.walk(node): @@ -43,7 +45,7 @@ def visit_keyword(self, node: ast.keyword) -> None: self.requires_python = get_constant(node.value) -def setup_py_python_requires(content: str) -> Optional[str]: +def setup_py_python_requires(content: str) -> str | None: try: tree = ast.parse(content) analyzer = Analyzer() @@ -53,7 +55,7 @@ def setup_py_python_requires(content: str) -> Optional[str]: return None -def get_requires_python_str(package_dir: Path) -> Optional[str]: +def get_requires_python_str(package_dir: Path) -> str | None: """Return the python requires string from the most canonical source available, or None""" # Read in from pyproject.toml:project.requires-python diff --git a/cibuildwheel/typing.py b/cibuildwheel/typing.py index 1e6e57873..a546d7bf3 100644 --- a/cibuildwheel/typing.py +++ b/cibuildwheel/typing.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import subprocess import sys @@ -36,7 +38,7 @@ PlatformName = Literal["linux", "macos", "windows"] -PLATFORMS: Final[Set[PlatformName]] = {"linux", "macos", "windows"} +PLATFORMS: Final[set[PlatformName]] = {"linux", "macos", "windows"} def assert_never(value: NoReturn) -> NoReturn: diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py index d2287a056..6a6a6e2a4 100644 --- a/cibuildwheel/util.py +++ b/cibuildwheel/util.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib import fnmatch import itertools @@ -18,15 +20,11 @@ from typing import ( Any, ClassVar, - Dict, Generator, Iterable, - List, - Optional, Sequence, TextIO, TypeVar, - Union, cast, overload, ) @@ -98,8 +96,8 @@ @overload def call( *args: PathOrStr, - env: Optional[Dict[str, str]] = None, - cwd: Optional[PathOrStr] = None, + env: dict[str, str] | None = None, + cwd: PathOrStr | None = None, capture_stdout: Literal[False] = ..., ) -> None: ... @@ -108,8 +106,8 @@ def call( @overload def call( *args: PathOrStr, - env: Optional[Dict[str, str]] = None, - cwd: Optional[PathOrStr] = None, + env: dict[str, str] | None = None, + cwd: PathOrStr | None = None, capture_stdout: Literal[True], ) -> str: ... @@ -117,10 +115,10 @@ def call( def call( *args: PathOrStr, - env: Optional[Dict[str, str]] = None, - cwd: Optional[PathOrStr] = None, + env: dict[str, str] | None = None, + cwd: PathOrStr | None = None, capture_stdout: bool = False, -) -> Optional[str]: +) -> str | None: """ Run subprocess.run, but print the commands first. Takes the commands as *args. Uses shell=True on Windows due to a bug. Also converts to @@ -130,7 +128,7 @@ def call( args_ = [str(arg) for arg in args] # print the command executing for the logs print("+ " + " ".join(shlex.quote(a) for a in args_)) - kwargs: Dict[str, Any] = {} + kwargs: dict[str, Any] = {} if capture_stdout: kwargs["universal_newlines"] = True kwargs["stdout"] = subprocess.PIPE @@ -140,9 +138,7 @@ def call( return cast(str, result.stdout) -def shell( - *commands: str, env: Optional[Dict[str, str]] = None, cwd: Optional[PathOrStr] = None -) -> None: +def shell(*commands: str, env: dict[str, str] | None = None, cwd: PathOrStr | None = None) -> None: command = " ".join(commands) print(f"+ {command}") subprocess.run(command, env=env, cwd=cwd, shell=True, check=True) @@ -200,7 +196,7 @@ def prepare_command(command: str, **kwargs: PathOrStr) -> str: return format_safe(command, python="python", pip="pip", **kwargs) -def get_build_verbosity_extra_flags(level: int) -> List[str]: +def get_build_verbosity_extra_flags(level: int) -> list[str]: if level > 0: return ["-" + level * "v"] elif level < 0: @@ -209,11 +205,11 @@ def get_build_verbosity_extra_flags(level: int) -> List[str]: return [] -def read_python_configs(config: PlatformName) -> List[Dict[str, str]]: +def read_python_configs(config: PlatformName) -> list[dict[str, str]]: input_file = resources_dir / "build-platforms.toml" with input_file.open("rb") as f: loaded_file = tomllib.load(f) - results: List[Dict[str, str]] = list(loaded_file[config]["python_configurations"]) + results: list[dict[str, str]] = list(loaded_file[config]["python_configurations"]) return results @@ -243,7 +239,7 @@ class BuildSelector: build_config: str skip_config: str - requires_python: Optional[SpecifierSet] = None + requires_python: SpecifierSet | None = None # a pattern that skips prerelease versions, when include_prereleases is False. PRERELEASE_SKIP: ClassVar[str] = "cp311-*" @@ -328,7 +324,7 @@ def __init__(self, base_file_path: Path): self.base_file_path = base_file_path.resolve() @staticmethod - def with_defaults() -> "DependencyConstraints": + def with_defaults() -> DependencyConstraints: return DependencyConstraints(base_file_path=resources_dir / "constraints.txt") def get_for_python_version(self, version: str) -> Path: @@ -400,7 +396,7 @@ class CIProvider(Enum): other = "other" -def detect_ci_provider() -> Optional[CIProvider]: +def detect_ci_provider() -> CIProvider | None: if "TRAVIS" in os.environ: return CIProvider.travis_ci elif "APPVEYOR" in os.environ: @@ -473,7 +469,7 @@ def print_new_wheels(msg: str, output_dir: Path) -> Generator[None, None, None]: ) -def get_pip_version(env: Dict[str, str]) -> str: +def get_pip_version(env: dict[str, str]) -> str: versions_output_text = call( "python", "-m", "pip", "freeze", "--all", capture_stdout=True, env=env ) @@ -501,7 +497,7 @@ def _ensure_virtualenv() -> Path: def _parse_constraints_for_virtualenv( dependency_constraint_flags: Sequence[PathOrStr], -) -> Dict[str, str]: +) -> dict[str, str]: """ Parses the constraints file referenced by `dependency_constraint_flags` and returns a dict where the key is the package name, and the value is the constraint version. @@ -547,7 +543,7 @@ def _parse_constraints_for_virtualenv( def virtualenv( python: Path, venv_path: Path, dependency_constraint_flags: Sequence[PathOrStr] -) -> Dict[str, str]: +) -> dict[str, str]: assert python.exists() virtualenv_app = _ensure_virtualenv() constraints = _parse_constraints_for_virtualenv(dependency_constraint_flags) @@ -589,7 +585,7 @@ def virtualenv( T = TypeVar("T", bound=PurePath) -def find_compatible_wheel(wheels: Sequence[T], identifier: str) -> Optional[T]: +def find_compatible_wheel(wheels: Sequence[T], identifier: str) -> T | None: """ Finds a wheel with an abi3 or a none ABI tag in `wheels` compatible with the Python interpreter specified by `identifier` that is previously built. @@ -641,7 +637,7 @@ def find_compatible_wheel(wheels: Sequence[T], identifier: str) -> Optional[T]: # Can be replaced by contextlib.chdir in Python 3.11 @contextlib.contextmanager -def chdir(new_path: Union[Path, str]) -> Generator[None, None, None]: +def chdir(new_path: Path | str) -> Generator[None, None, None]: """Non thread-safe context manager to change the current working directory.""" cwd = os.getcwd() diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 82309a232..b6e223ec5 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import shutil import subprocess @@ -5,7 +7,7 @@ from dataclasses import dataclass from functools import lru_cache from pathlib import Path -from typing import Dict, List, Optional, Sequence, Set +from typing import Sequence from zipfile import ZipFile from filelock import FileLock @@ -34,7 +36,7 @@ ) -def get_nuget_args(version: str, arch: str, output_directory: Path) -> List[str]: +def get_nuget_args(version: str, arch: str, output_directory: Path) -> list[str]: platform_suffix = {"32": "x86", "64": "", "ARM64": "arm64"} python_name = "python" + platform_suffix[arch] return [ @@ -53,13 +55,13 @@ class PythonConfiguration: version: str arch: str identifier: str - url: Optional[str] = None + url: str | None = None def get_python_configurations( build_selector: BuildSelector, - architectures: Set[Architecture], -) -> List[PythonConfiguration]: + architectures: set[Architecture], +) -> list[PythonConfiguration]: full_python_configs = read_python_configs("windows") @@ -124,7 +126,7 @@ def setup_python( dependency_constraint_flags: Sequence[PathOrStr], environment: ParsedEnvironment, build_frontend: BuildFrontend, -) -> Dict[str, str]: +) -> dict[str, str]: tmp.mkdir() implementation_id = python_configuration.identifier.split("-")[0] log.step(f"Installing Python {implementation_id}...") @@ -253,7 +255,7 @@ def build(options: Options, tmp_path: Path) -> None: ) shell(before_all_prepared, env=env) - built_wheels: List[Path] = [] + built_wheels: list[Path] = [] for config in python_configurations: build_options = options.build_options(config.identifier) diff --git a/docs/main.py b/docs/main.py index b17982372..acb0d49cd 100644 --- a/docs/main.py +++ b/docs/main.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess from typing import Any diff --git a/noxfile.py b/noxfile.py index f045e616f..659e7ff52 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import shutil import sys diff --git a/setup.py b/setup.py index 6c08425d8..0cb950285 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from setuptools import setup extras = { diff --git a/test/conftest.py b/test/conftest.py index e7c421123..872eeb172 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations import pytest @@ -13,5 +13,5 @@ def pytest_addoption(parser) -> None: @pytest.fixture( params=[{"CIBW_BUILD_FRONTEND": "pip"}, {"CIBW_BUILD_FRONTEND": "build"}], ids=["pip", "build"] ) -def build_frontend_env(request) -> Dict[str, str]: +def build_frontend_env(request) -> dict[str, str]: return request.param # type: ignore[no-any-return] diff --git a/test/test_0_basic.py b/test/test_0_basic.py index 2d2e8d97f..5fb7a2410 100644 --- a/test/test_0_basic.py +++ b/test/test_0_basic.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap import pytest diff --git a/test/test_abi_variants.py b/test/test_abi_variants.py index 932a2ec01..114736553 100644 --- a/test/test_abi_variants.py +++ b/test/test_abi_variants.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from . import test_projects, utils diff --git a/test/test_before_all.py b/test/test_before_all.py index 9c8722d72..bad2d4c0f 100644 --- a/test/test_before_all.py +++ b/test/test_before_all.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess import textwrap diff --git a/test/test_before_build.py b/test/test_before_build.py index 00906acc1..1ee7757e4 100644 --- a/test/test_before_build.py +++ b/test/test_before_build.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess import textwrap diff --git a/test/test_before_test.py b/test/test_before_test.py index 535131aa0..5c3e09d2b 100644 --- a/test/test_before_test.py +++ b/test/test_before_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from . import test_projects, utils before_test_project = test_projects.new_c_project() diff --git a/test/test_build_skip.py b/test/test_build_skip.py index 0d285d822..e29d14f10 100644 --- a/test/test_build_skip.py +++ b/test/test_build_skip.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from . import test_projects, utils diff --git a/test/test_container_images.py b/test/test_container_images.py index 8318a64ea..75b102e38 100644 --- a/test/test_container_images.py +++ b/test/test_container_images.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import platform import textwrap diff --git a/test/test_cpp_standards.py b/test/test_cpp_standards.py index a5385007f..f09e7a530 100644 --- a/test/test_cpp_standards.py +++ b/test/test_cpp_standards.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import jinja2 diff --git a/test/test_dependency_versions.py b/test/test_dependency_versions.py index 90854a866..e1f206324 100644 --- a/test/test_dependency_versions.py +++ b/test/test_dependency_versions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import re import textwrap diff --git a/test/test_emulation.py b/test/test_emulation.py index 95b574dd7..6b29c019b 100644 --- a/test/test_emulation.py +++ b/test/test_emulation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess import pytest diff --git a/test/test_environment.py b/test/test_environment.py index 6ad8ff9f4..4382df44e 100644 --- a/test/test_environment.py +++ b/test/test_environment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import subprocess import textwrap diff --git a/test/test_from_sdist.py b/test/test_from_sdist.py index d1d4ff115..f0b7e93e8 100644 --- a/test/test_from_sdist.py +++ b/test/test_from_sdist.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import subprocess import sys diff --git a/test/test_macos_archs.py b/test/test_macos_archs.py index a85a6b245..d3a56fb7a 100644 --- a/test/test_macos_archs.py +++ b/test/test_macos_archs.py @@ -1,6 +1,7 @@ +from __future__ import annotations + import platform import subprocess -from typing import Tuple import pytest @@ -14,7 +15,7 @@ } -def get_xcode_version() -> Tuple[int, int]: +def get_xcode_version() -> tuple[int, int]: output = subprocess.run( ["xcodebuild", "-version"], text=True, diff --git a/test/test_manylinuxXXXX_only.py b/test/test_manylinuxXXXX_only.py index 935aa5925..6013e856f 100644 --- a/test/test_manylinuxXXXX_only.py +++ b/test/test_manylinuxXXXX_only.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import platform import textwrap diff --git a/test/test_pep518.py b/test/test_pep518.py index 128834280..0f1bc0c55 100644 --- a/test/test_pep518.py +++ b/test/test_pep518.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from . import test_projects, utils diff --git a/test/test_podman.py b/test/test_podman.py index dd07572b7..ea3bd8a69 100644 --- a/test/test_podman.py +++ b/test/test_podman.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from . import test_projects, utils diff --git a/test/test_projects/__init__.py b/test/test_projects/__init__.py index d6bed8189..2d8da665b 100644 --- a/test/test_projects/__init__.py +++ b/test/test_projects/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from .base import TestProject from .c import new_c_project diff --git a/test/test_projects/__main__.py b/test/test_projects/__main__.py index a1e77c432..0d3cf2520 100644 --- a/test/test_projects/__main__.py +++ b/test/test_projects/__main__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import importlib import subprocess import sys diff --git a/test/test_projects/base.py b/test/test_projects/base.py index 66d0006ed..c4ea54039 100644 --- a/test/test_projects/base.py +++ b/test/test_projects/base.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import Path from typing import Any, Dict, Union diff --git a/test/test_projects/c.py b/test/test_projects/c.py index d4c37c694..62252a620 100644 --- a/test/test_projects/c.py +++ b/test/test_projects/c.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import jinja2 from .base import TestProject diff --git a/test/test_pure_wheel.py b/test/test_pure_wheel.py index 2ba33711f..f7a4807bd 100644 --- a/test/test_pure_wheel.py +++ b/test/test_pure_wheel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess from test import test_projects diff --git a/test/test_same_wheel.py b/test/test_same_wheel.py index d89f28cb7..f25cba5da 100644 --- a/test/test_same_wheel.py +++ b/test/test_same_wheel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess from test import test_projects diff --git a/test/test_ssl.py b/test/test_ssl.py index 5283a59d4..9c35650eb 100644 --- a/test/test_ssl.py +++ b/test/test_ssl.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from . import test_projects, utils diff --git a/test/test_subdir_package.py b/test/test_subdir_package.py index 9241ae30f..c1d73df1a 100644 --- a/test/test_subdir_package.py +++ b/test/test_subdir_package.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import Path import jinja2 diff --git a/test/test_testing.py b/test/test_testing.py index ef41f35a5..c7264383c 100644 --- a/test/test_testing.py +++ b/test/test_testing.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import subprocess import textwrap diff --git a/test/test_troubleshooting.py b/test/test_troubleshooting.py index 7039c2687..e647bca69 100644 --- a/test/test_troubleshooting.py +++ b/test/test_troubleshooting.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import subprocess import pytest diff --git a/test/test_wheel_tag.py b/test/test_wheel_tag.py index a026b2d77..786eaa7ac 100644 --- a/test/test_wheel_tag.py +++ b/test/test_wheel_tag.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from . import test_projects, utils diff --git a/test/utils.py b/test/utils.py index ebe682e37..947c89689 100644 --- a/test/utils.py +++ b/test/utils.py @@ -4,6 +4,8 @@ This file is added to the PYTHONPATH in the test runner at bin/run_test.py. """ +from __future__ import annotations + import os import platform as pm import subprocess diff --git a/unit_test/build_ids_test.py b/unit_test/build_ids_test.py index 60ac38748..0f62ba408 100644 --- a/unit_test/build_ids_test.py +++ b/unit_test/build_ids_test.py @@ -1,5 +1,6 @@ +from __future__ import annotations + import sys -from typing import Dict, List if sys.version_info >= (3, 11): import tomllib @@ -27,7 +28,7 @@ def test_compare_configs(): def test_dump_with_Version(): # MyPy doesn't understand deeply nested dicts correctly - example: Dict[str, Dict[str, List[Dict[str, Printable]]]] = { + example: dict[str, dict[str, list[dict[str, Printable]]]] = { "windows": { "python_configurations": [ {"identifier": "cp27-win32", "version": Version("2.7.18"), "arch": "32"}, diff --git a/unit_test/build_selector_test.py b/unit_test/build_selector_test.py index b71cb05f8..14ff8da63 100644 --- a/unit_test/build_selector_test.py +++ b/unit_test/build_selector_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from packaging.specifiers import SpecifierSet from cibuildwheel.util import BuildSelector diff --git a/unit_test/conftest.py b/unit_test/conftest.py index 3d98c30b0..7e1df1b2c 100644 --- a/unit_test/conftest.py +++ b/unit_test/conftest.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys from pathlib import Path diff --git a/unit_test/dependency_constraints_test.py b/unit_test/dependency_constraints_test.py index 952151958..ce907d5e3 100644 --- a/unit_test/dependency_constraints_test.py +++ b/unit_test/dependency_constraints_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import Path from cibuildwheel.util import DependencyConstraints diff --git a/unit_test/download_test.py b/unit_test/download_test.py index 0aac14309..efc5c4e5b 100644 --- a/unit_test/download_test.py +++ b/unit_test/download_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import ssl import certifi diff --git a/unit_test/environment_test.py b/unit_test/environment_test.py index c1d0a4a1d..386787712 100644 --- a/unit_test/environment_test.py +++ b/unit_test/environment_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os from cibuildwheel.environment import parse_environment diff --git a/unit_test/linux_build_steps_test.py b/unit_test/linux_build_steps_test.py index 36aaebb70..809cdf650 100644 --- a/unit_test/linux_build_steps_test.py +++ b/unit_test/linux_build_steps_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from pathlib import Path from pprint import pprint diff --git a/unit_test/main_tests/conftest.py b/unit_test/main_tests/conftest.py index 973012cfb..257321873 100644 --- a/unit_test/main_tests/conftest.py +++ b/unit_test/main_tests/conftest.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib import platform as platform_module import subprocess diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 59368de5b..813fd5c56 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys from fnmatch import fnmatch from pathlib import Path diff --git a/unit_test/main_tests/main_platform_test.py b/unit_test/main_tests/main_platform_test.py index 8974a27ec..61dd8e850 100644 --- a/unit_test/main_tests/main_platform_test.py +++ b/unit_test/main_tests/main_platform_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys import pytest diff --git a/unit_test/main_tests/main_requires_python_test.py b/unit_test/main_tests/main_requires_python_test.py index 0edb09375..e513f7436 100644 --- a/unit_test/main_tests/main_requires_python_test.py +++ b/unit_test/main_tests/main_requires_python_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys import textwrap diff --git a/unit_test/oci_container_test.py b/unit_test/oci_container_test.py index 05ef24fd1..30739db72 100644 --- a/unit_test/oci_container_test.py +++ b/unit_test/oci_container_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import platform import random diff --git a/unit_test/option_prepare_test.py b/unit_test/option_prepare_test.py index 3eef68a77..bc01317b3 100644 --- a/unit_test/option_prepare_test.py +++ b/unit_test/option_prepare_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import platform as platform_module import subprocess import sys diff --git a/unit_test/options_test.py b/unit_test/options_test.py index 3ce8b2147..a609bb492 100644 --- a/unit_test/options_test.py +++ b/unit_test/options_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import platform as platform_module import pytest diff --git a/unit_test/options_toml_test.py b/unit_test/options_toml_test.py index 1dcfdc212..a3fab2cc8 100644 --- a/unit_test/options_toml_test.py +++ b/unit_test/options_toml_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import Path import pytest diff --git a/unit_test/projectfiles_test.py b/unit_test/projectfiles_test.py index 6c55d46a1..e7e21ba5d 100644 --- a/unit_test/projectfiles_test.py +++ b/unit_test/projectfiles_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from textwrap import dedent from cibuildwheel.projectfiles import get_requires_python_str, setup_py_python_requires diff --git a/unit_test/utils.py b/unit_test/utils.py index 2b312ecad..0cd2fefb3 100644 --- a/unit_test/utils.py +++ b/unit_test/utils.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import Path from cibuildwheel.options import CommandLineArguments diff --git a/unit_test/utils_test.py b/unit_test/utils_test.py index 7f949a739..adf214358 100644 --- a/unit_test/utils_test.py +++ b/unit_test/utils_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import PurePath import pytest diff --git a/unit_test/wheel_print_test.py b/unit_test/wheel_print_test.py index 020600604..fe68f7181 100644 --- a/unit_test/wheel_print_test.py +++ b/unit_test/wheel_print_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from cibuildwheel.util import print_new_wheels From 8575b35cc27c0c0f685d6292a628ede312d3fa00 Mon Sep 17 00:00:00 2001 From: Hadi Alqattan Date: Tue, 19 Jul 2022 13:05:33 +0300 Subject: [PATCH 04/28] Upgrading Pycln from v2.0.3 to v2.0.4 Pycln v2.0.3 has some issues with Py3.9+. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fdd22536f..8437bbb13 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: # Autoremoves unused imports - repo: https://github.com/hadialqattan/pycln - rev: v2.0.3 + rev: v2.0.4 hooks: - id: pycln args: [--all] From fc15836c636a92caf57bbe6fe87de1f49911576e Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 06:15:53 +0000 Subject: [PATCH 05/28] Update dependencies --- .../resources/constraints-python310.txt | 2 +- .../resources/constraints-python311.txt | 2 +- .../resources/constraints-python37.txt | 2 +- .../resources/constraints-python38.txt | 2 +- .../resources/constraints-python39.txt | 2 +- cibuildwheel/resources/constraints.txt | 2 +- .../resources/pinned_docker_images.cfg | 60 ++--- docs/working-examples.md | 212 +++++++++--------- 8 files changed, 142 insertions(+), 142 deletions(-) diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index 1b4a6b317..f3d3b7f9a 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -24,7 +24,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==22.2 # via -r cibuildwheel/resources/constraints.in setuptools==63.2.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index 93901adbe..849abf49e 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -24,7 +24,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==22.2 # via -r cibuildwheel/resources/constraints.in setuptools==63.2.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index f5a8ac312..78ea26b2c 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -30,7 +30,7 @@ zipp==3.8.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==22.2 # via -r cibuildwheel/resources/constraints.in setuptools==63.2.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index c13a47faa..aa06de6ee 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -24,7 +24,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==22.2 # via -r cibuildwheel/resources/constraints.in setuptools==63.2.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index f5f35ff1f..0aed606e5 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -24,7 +24,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==22.2 # via -r cibuildwheel/resources/constraints.in setuptools==63.2.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index f5f35ff1f..0aed606e5 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -24,7 +24,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==22.2 # via -r cibuildwheel/resources/constraints.in setuptools==63.2.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 4c829bd6a..1fe4bf412 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,48 +1,48 @@ [x86_64] manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-07-17-f8ddacc -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-07-17-51324db -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-07-17-51324db -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-07-17-51324db -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-07-17-51324db +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-07-21-947f13c +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-07-21-947f13c +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-07-21-947f13c [i686] manylinux1 = quay.io/pypa/manylinux1_i686:2022-07-17-f8ddacc -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-07-17-51324db -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-07-17-51324db -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-07-17-51324db +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-07-21-947f13c +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-07-21-947f13c [pypy_x86_64] -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-07-17-51324db -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-07-17-51324db -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-07-17-51324db +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-07-21-947f13c +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-07-21-947f13c [pypy_i686] -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-07-17-51324db -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-07-17-51324db +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-07-21-947f13c [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-07-17-51324db -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-07-17-51324db -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-07-17-51324db +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-07-21-947f13c +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-07-21-947f13c +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-07-21-947f13c [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-07-17-51324db -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-07-17-51324db -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-07-17-51324db +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-07-21-947f13c +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-07-21-947f13c +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-07-21-947f13c [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-07-17-51324db -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-07-17-51324db +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-07-21-947f13c +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-07-21-947f13c [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-07-17-51324db -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-07-17-51324db -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-07-17-51324db +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-07-21-947f13c +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-07-21-947f13c +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-07-21-947f13c diff --git a/docs/working-examples.md b/docs/working-examples.md index 328d1dbb9..63b34bb81 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -24,10 +24,10 @@ title: Working examples | [vaex][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀 | | [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library | | [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. | -| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. | | [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System | -| [scikit-image][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Image processing library. Uses cibuildwheel to build and test a project that uses Cython with platform-native code. | +| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. | | [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. | +| [scikit-image][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Image processing library. Uses cibuildwheel to build and test a project that uses Cython with platform-native code. | | [cmake][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. | | [twisted-iocpsupport][] | ![github icon][] | ![windows icon][] | A submodule of Twisted that hooks into native C APIs using Cython. | | [websockets][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Library for building WebSocket servers and clients. Mostly written in Python, with a small C 'speedups' extension module. | @@ -57,8 +57,8 @@ title: Working examples | [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python | | [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data | | [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. | -| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. | | [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python | +| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. | | [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) | | [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data | | [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python | @@ -105,8 +105,8 @@ title: Working examples | [ninja][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. | | [GSD][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Cython and NumPy project with 64-bit wheels. | | [pyinstrument_cext][] | ![travisci icon][] ![appveyor icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A simple C extension, without external dependencies | -| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. | | [CorrectionLib][] | ![github icon][] | ![apple icon][] ![linux icon][] | Structured JSON powered correction library for HEP, designed for the CMS experiment at CERN. | +| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. | | [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. | [scikit-learn]: https://github.com/scikit-learn/scikit-learn @@ -125,10 +125,10 @@ title: Working examples [vaex]: https://github.com/vaexio/vaex [Google Benchmark]: https://github.com/google/benchmark [Apache Beam]: https://github.com/apache/beam -[asyncpg]: https://github.com/MagicStack/asyncpg [duckdb]: https://github.com/duckdb/duckdb -[scikit-image]: https://github.com/scikit-image/scikit-image +[asyncpg]: https://github.com/MagicStack/asyncpg [PyGame]: https://github.com/pygame/pygame +[scikit-image]: https://github.com/scikit-image/scikit-image [cmake]: https://github.com/scikit-build/cmake-python-distributions [twisted-iocpsupport]: https://github.com/twisted/twisted-iocpsupport [websockets]: https://github.com/aaugustin/websockets @@ -158,8 +158,8 @@ title: Working examples [Line Profiler]: https://github.com/pyutils/line_profiler [PyTables]: https://github.com/PyTables/PyTables [OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO -[ruptures]: https://github.com/deepcharles/ruptures [aioquic]: https://github.com/aiortc/aioquic +[ruptures]: https://github.com/deepcharles/ruptures [DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest [google neuroglancer]: https://github.com/google/neuroglancer [Psycopg 3]: https://github.com/psycopg/psycopg @@ -206,8 +206,8 @@ title: Working examples [ninja]: https://github.com/scikit-build/ninja-python-distributions [GSD]: https://github.com/glotzerlab/gsd [pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext -[xmlstarlet]: https://github.com/dimitern/xmlstarlet [CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib +[xmlstarlet]: https://github.com/dimitern/xmlstarlet [SiPM]: https://github.com/EdoPro98/SimSiPM [appveyor icon]: data/readme_icons/appveyor.svg @@ -220,106 +220,106 @@ title: Working examples [apple icon]: data/readme_icons/apple.svg [linux icon]: data/readme_icons/linux.svg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + From aa4ca4268384a02c0b5581effaab86b8a29d1ff9 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Mon, 25 Jul 2022 16:15:00 +0200 Subject: [PATCH 06/28] Fix Rosetta2 usage for shell commands --- cibuildwheel/macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index beb4d32ea..d6b5b9828 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -505,7 +505,7 @@ def build(options: Options, tmp_path: Path) -> None: # define a custom 'call' function that adds the arch prefix each time call_with_arch = functools.partial(call, *arch_prefix) - shell_with_arch = functools.partial(shell, *arch_prefix) + shell_with_arch = functools.partial(call, *arch_prefix, "/bin/sh", "-c") # Use --no-download to ensure determinism by using seed libraries # built into virtualenv From 1a7abe562b51163c0b8d1d6901ab25da52550483 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Mon, 25 Jul 2022 17:01:22 +0200 Subject: [PATCH 07/28] Remove dependency on Unix tools in Windows --- test/test_environment.py | 2 +- unit_test/environment_test.py | 29 +++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/test/test_environment.py b/test/test_environment.py index 6ad8ff9f4..d2b75f0a4 100644 --- a/test/test_environment.py +++ b/test/test_environment.py @@ -43,7 +43,7 @@ def test(tmp_path): project_dir, add_env={ "CIBW_ENVIRONMENT": """CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH=$PATH:/opt/cibw_test_path""", - "CIBW_ENVIRONMENT_WINDOWS": '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH="$PATH;/opt/cibw_test_path"''', + "CIBW_ENVIRONMENT_WINDOWS": '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(cmd /C echo test string 3)" PATH="$PATH;/opt/cibw_test_path"''', }, ) diff --git a/unit_test/environment_test.py b/unit_test/environment_test.py index c1d0a4a1d..8c67b259f 100644 --- a/unit_test/environment_test.py +++ b/unit_test/environment_test.py @@ -1,4 +1,5 @@ import os +import sys from cibuildwheel.environment import parse_environment @@ -28,7 +29,11 @@ def test_inheritance(): def test_shell_eval(): - environment_recipe = parse_environment('VAR="$(echo "a test" string)"') + if sys.platform == "win32": + env_string = 'VAR="$(cmd /C "echo a test string")"' + else: + env_string = 'VAR="$(echo "a test" string)"' + environment_recipe = parse_environment(env_string) env_copy = os.environ.copy() env_copy.pop("VAR", None) @@ -39,7 +44,11 @@ def test_shell_eval(): def test_shell_eval_and_env(): - environment_recipe = parse_environment('VAR="$(echo "$PREV_VAR" string)"') + if sys.platform == "win32": + env_string = 'VAR="$(cmd /C "echo $PREV_VAR string")"' + else: + env_string = 'VAR="$(echo "$PREV_VAR" string)"' + environment_recipe = parse_environment(env_string) environment_dict = environment_recipe.as_dictionary(prev_environment={"PREV_VAR": "1 2 3"}) @@ -73,7 +82,11 @@ def test_no_vars_pass_through(): def test_operators_inside_eval(): - environment_recipe = parse_environment('SOMETHING="$(echo a; echo b; echo c)"') + if sys.platform == "win32": + env_string = 'SOMETHING="$(cmd /C echo a; cmd /C echo b; cmd /C echo c)"' + else: + env_string = 'SOMETHING="$(echo a; echo b; echo c)"' + environment_recipe = parse_environment(env_string) # pass the existing process env so PATH is available environment_dict = environment_recipe.as_dictionary(os.environ.copy()) @@ -91,9 +104,13 @@ def test_substitution_with_backslash(): def test_awkwardly_quoted_variable(): - environment_recipe = parse_environment( - 'VAR2=something"like this""$VAR1"$VAR1$(echo "there is more")"$(echo "and more!")"' - ) + if sys.platform == "win32": + env_string = 'VAR2=something"like this""$VAR1"$VAR1$(cmd /C echo there is more)"$(cmd /C echo and more!)"' + else: + env_string = ( + 'VAR2=something"like this""$VAR1"$VAR1$(echo "there is more")"$(echo "and more!")"' + ) + environment_recipe = parse_environment(env_string) # pass the existing process env so PATH is available environment_dict = environment_recipe.as_dictionary({"VAR1": "but wait"}) From 23cdab79e6d44ced3adafe2fed5642c672ff63a2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 19:17:51 +0000 Subject: [PATCH 08/28] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v2.37.1 → v2.37.2](https://github.com/asottile/pyupgrade/compare/v2.37.1...v2.37.2) - [github.com/asottile/setup-cfg-fmt: v1.20.1 → v1.20.2](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.1...v1.20.2) - [github.com/pre-commit/mirrors-mypy: v0.961 → v0.971](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.971) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8437bbb13..a1fa28a3a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v2.37.1 + rev: v2.37.2 hooks: - id: pyupgrade name: PyUpgrade 3.6+ @@ -44,12 +44,12 @@ repos: - id: black - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.1 + rev: v1.20.2 hooks: - id: setup-cfg-fmt - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.961 + rev: v0.971 hooks: - id: mypy name: mypy 3.6 on cibuildwheel/ From cccc2acae9c746839df9c0006a34f9df4f79af99 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Fri, 29 Jul 2022 18:04:27 +0200 Subject: [PATCH 09/28] Use an equivalent of Unix echo written in Python --- test/test_environment.py | 3 ++- unit_test/environment_test.py | 33 ++++++++++----------------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/test/test_environment.py b/test/test_environment.py index d2b75f0a4..079081ce1 100644 --- a/test/test_environment.py +++ b/test/test_environment.py @@ -33,6 +33,7 @@ def test(tmp_path): + python_echo = 'python -c "import sys; print(*sys.argv[1:])"' project_dir = tmp_path / "project" project_with_environment_asserts.generate(project_dir) @@ -43,7 +44,7 @@ def test(tmp_path): project_dir, add_env={ "CIBW_ENVIRONMENT": """CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH=$PATH:/opt/cibw_test_path""", - "CIBW_ENVIRONMENT_WINDOWS": '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(cmd /C echo test string 3)" PATH="$PATH;/opt/cibw_test_path"''', + "CIBW_ENVIRONMENT_WINDOWS": f'''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$({python_echo} 'test string 3')" PATH="$PATH;/opt/cibw_test_path"''', }, ) diff --git a/unit_test/environment_test.py b/unit_test/environment_test.py index 8c67b259f..696dff638 100644 --- a/unit_test/environment_test.py +++ b/unit_test/environment_test.py @@ -1,8 +1,9 @@ import os -import sys from cibuildwheel.environment import parse_environment +PYTHON_ECHO = 'python -c "import sys; print(*sys.argv[1:])"' + def test_basic_parsing(): environment_recipe = parse_environment("VAR=1 VBR=2") @@ -29,11 +30,7 @@ def test_inheritance(): def test_shell_eval(): - if sys.platform == "win32": - env_string = 'VAR="$(cmd /C "echo a test string")"' - else: - env_string = 'VAR="$(echo "a test" string)"' - environment_recipe = parse_environment(env_string) + environment_recipe = parse_environment(f'VAR="$({PYTHON_ECHO} "a test" string)"') env_copy = os.environ.copy() env_copy.pop("VAR", None) @@ -44,11 +41,7 @@ def test_shell_eval(): def test_shell_eval_and_env(): - if sys.platform == "win32": - env_string = 'VAR="$(cmd /C "echo $PREV_VAR string")"' - else: - env_string = 'VAR="$(echo "$PREV_VAR" string)"' - environment_recipe = parse_environment(env_string) + environment_recipe = parse_environment(f'VAR="$({PYTHON_ECHO} "$PREV_VAR" string)"') environment_dict = environment_recipe.as_dictionary(prev_environment={"PREV_VAR": "1 2 3"}) @@ -82,11 +75,9 @@ def test_no_vars_pass_through(): def test_operators_inside_eval(): - if sys.platform == "win32": - env_string = 'SOMETHING="$(cmd /C echo a; cmd /C echo b; cmd /C echo c)"' - else: - env_string = 'SOMETHING="$(echo a; echo b; echo c)"' - environment_recipe = parse_environment(env_string) + environment_recipe = parse_environment( + f'SOMETHING="$({PYTHON_ECHO} a; {PYTHON_ECHO} b; {PYTHON_ECHO} c)"' + ) # pass the existing process env so PATH is available environment_dict = environment_recipe.as_dictionary(os.environ.copy()) @@ -104,13 +95,9 @@ def test_substitution_with_backslash(): def test_awkwardly_quoted_variable(): - if sys.platform == "win32": - env_string = 'VAR2=something"like this""$VAR1"$VAR1$(cmd /C echo there is more)"$(cmd /C echo and more!)"' - else: - env_string = ( - 'VAR2=something"like this""$VAR1"$VAR1$(echo "there is more")"$(echo "and more!")"' - ) - environment_recipe = parse_environment(env_string) + environment_recipe = parse_environment( + f'VAR2=something"like this""$VAR1"$VAR1$({PYTHON_ECHO} "there is more")"$({PYTHON_ECHO} "and more!")"' + ) # pass the existing process env so PATH is available environment_dict = environment_recipe.as_dictionary({"VAR1": "but wait"}) From e0f25c5fb56683b57c11bd55e3cae302b3c1dafd Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Fri, 29 Jul 2022 18:52:26 +0200 Subject: [PATCH 10/28] Use sys.executable --- test/test_environment.py | 3 ++- unit_test/environment_test.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_environment.py b/test/test_environment.py index 079081ce1..973265499 100644 --- a/test/test_environment.py +++ b/test/test_environment.py @@ -1,5 +1,6 @@ import os import subprocess +import sys import textwrap import pytest @@ -33,7 +34,7 @@ def test(tmp_path): - python_echo = 'python -c "import sys; print(*sys.argv[1:])"' + python_echo = f'"{sys.executable}" -c "import sys; print(*sys.argv[1:])"' project_dir = tmp_path / "project" project_with_environment_asserts.generate(project_dir) diff --git a/unit_test/environment_test.py b/unit_test/environment_test.py index 696dff638..3161a294a 100644 --- a/unit_test/environment_test.py +++ b/unit_test/environment_test.py @@ -1,8 +1,9 @@ import os +import sys from cibuildwheel.environment import parse_environment -PYTHON_ECHO = 'python -c "import sys; print(*sys.argv[1:])"' +PYTHON_ECHO = f'"{sys.executable}" -c "import sys; print(*sys.argv[1:])"' def test_basic_parsing(): From 3cbe1756327ee38d0f6b8f558ea9daf773ea9257 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Fri, 29 Jul 2022 18:57:47 +0200 Subject: [PATCH 11/28] Fix Windows paths getting escaped --- test/test_environment.py | 2 +- unit_test/environment_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_environment.py b/test/test_environment.py index 973265499..b784edabc 100644 --- a/test/test_environment.py +++ b/test/test_environment.py @@ -34,7 +34,7 @@ def test(tmp_path): - python_echo = f'"{sys.executable}" -c "import sys; print(*sys.argv[1:])"' + python_echo = f"'{sys.executable}' -c \"import sys; print(*sys.argv[1:])\"" project_dir = tmp_path / "project" project_with_environment_asserts.generate(project_dir) diff --git a/unit_test/environment_test.py b/unit_test/environment_test.py index 3161a294a..405fc8ac7 100644 --- a/unit_test/environment_test.py +++ b/unit_test/environment_test.py @@ -3,7 +3,7 @@ from cibuildwheel.environment import parse_environment -PYTHON_ECHO = f'"{sys.executable}" -c "import sys; print(*sys.argv[1:])"' +PYTHON_ECHO = f"'{sys.executable}' -c \"import sys; print(*sys.argv[1:])\"" def test_basic_parsing(): From 7c95f77524d56682ded70770f4cb9892419ec572 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 29 Jul 2022 18:48:43 +0100 Subject: [PATCH 12/28] Ensure the tests that use subcommands have access to the system env --- unit_test/environment_test.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/unit_test/environment_test.py b/unit_test/environment_test.py index 405fc8ac7..c5e6e57cf 100644 --- a/unit_test/environment_test.py +++ b/unit_test/environment_test.py @@ -3,6 +3,7 @@ from cibuildwheel.environment import parse_environment +# this command is equivalent to Unix 'echo', but works on Windows too PYTHON_ECHO = f"'{sys.executable}' -c \"import sys; print(*sys.argv[1:])\"" @@ -44,9 +45,10 @@ def test_shell_eval(): def test_shell_eval_and_env(): environment_recipe = parse_environment(f'VAR="$({PYTHON_ECHO} "$PREV_VAR" string)"') - environment_dict = environment_recipe.as_dictionary(prev_environment={"PREV_VAR": "1 2 3"}) + prev_environment = {**os.environ, "PREV_VAR": "1 2 3"} + environment_dict = environment_recipe.as_dictionary(prev_environment=prev_environment) - assert environment_dict == {"PREV_VAR": "1 2 3", "VAR": "1 2 3 string"} + assert environment_dict == {**prev_environment, "VAR": "1 2 3 string"} def test_empty_var(): @@ -80,8 +82,8 @@ def test_operators_inside_eval(): f'SOMETHING="$({PYTHON_ECHO} a; {PYTHON_ECHO} b; {PYTHON_ECHO} c)"' ) - # pass the existing process env so PATH is available - environment_dict = environment_recipe.as_dictionary(os.environ.copy()) + # pass the existing process env so subcommands can be run in the evaluation + environment_dict = environment_recipe.as_dictionary(prev_environment=os.environ.copy()) assert environment_dict.get("SOMETHING") == "a\nb\nc" @@ -89,7 +91,6 @@ def test_operators_inside_eval(): def test_substitution_with_backslash(): environment_recipe = parse_environment('PATH2="somewhere_else;$PATH1"') - # pass the existing process env so PATH is available environment_dict = environment_recipe.as_dictionary(prev_environment={"PATH1": "c:\\folder\\"}) assert environment_dict.get("PATH2") == "somewhere_else;c:\\folder\\" @@ -100,8 +101,8 @@ def test_awkwardly_quoted_variable(): f'VAR2=something"like this""$VAR1"$VAR1$({PYTHON_ECHO} "there is more")"$({PYTHON_ECHO} "and more!")"' ) - # pass the existing process env so PATH is available - environment_dict = environment_recipe.as_dictionary({"VAR1": "but wait"}) + prev_environment = {**os.environ, "VAR1": "but wait"} + environment_dict = environment_recipe.as_dictionary(prev_environment=prev_environment) assert ( environment_dict.get("VAR2") == "somethinglike thisbut waitbut waitthere is moreand more!" From 3c219a621f4fece814b9dd858bb90c1fb646d6b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 13:09:27 +0000 Subject: [PATCH 13/28] chore(deps): bump pypa/gh-action-pypi-publish from 1.5.0 to 1.5.1 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30772612f..325eaac5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.5.0 + - uses: pypa/gh-action-pypi-publish@v1.5.1 with: user: __token__ password: ${{ secrets.pypi_password }} From c234ff5f3609bb03d3d7b7e693503fa1b2bb9dbc Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 2 Aug 2022 14:43:07 -0400 Subject: [PATCH 14/28] fix: add suggestions to the TOML error message (#1205) * fix: add suggestions to the TOML error message Signed-off-by: Henry Schreiner * Update cibuildwheel/options.py Co-authored-by: Matthieu Darbois Co-authored-by: Matthieu Darbois --- cibuildwheel/options.py | 51 ++++++++++++++++++++-------------- unit_test/options_toml_test.py | 21 +++++++++++++- 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index 308036042..c8d050fa9 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -1,5 +1,6 @@ from __future__ import annotations +import difflib import functools import os import sys @@ -188,14 +189,10 @@ def __init__( # Validate project config for option_name in config_options: - if not self._is_valid_global_option(option_name): - raise ConfigOptionError(f'Option "{option_name}" not supported in a config file') + self._validate_global_option(option_name) for option_name in config_platform_options: - if not self._is_valid_platform_option(option_name): - raise ConfigOptionError( - f'Option "{option_name}" not supported in the "{self.platform}" section' - ) + self._validate_platform_option(option_name) self.config_options = config_options self.config_platform_options = config_platform_options @@ -207,40 +204,51 @@ def __init__( if config_overrides is not None: if not isinstance(config_overrides, list): - raise ConfigOptionError('"tool.cibuildwheel.overrides" must be a list') + raise ConfigOptionError("'tool.cibuildwheel.overrides' must be a list") for config_override in config_overrides: select = config_override.pop("select", None) if not select: - raise ConfigOptionError('"select" must be set in an override') + raise ConfigOptionError("'select' must be set in an override") if isinstance(select, list): select = " ".join(select) self.overrides.append(Override(select, config_override)) - def _is_valid_global_option(self, name: str) -> bool: + def _validate_global_option(self, name: str) -> None: """ - Returns True if an option with this name is allowed in the + Raises an error if an option with this name is not allowed in the [tool.cibuildwheel] section of a config file. """ allowed_option_names = self.default_options.keys() | PLATFORMS | {"overrides"} - return name in allowed_option_names + if name not in allowed_option_names: + msg = f"Option {name!r} not supported in a config file." + matches = difflib.get_close_matches(name, allowed_option_names, 1, 0.7) + if matches: + msg += f" Perhaps you meant {matches[0]!r}?" + raise ConfigOptionError(msg) - def _is_valid_platform_option(self, name: str) -> bool: + def _validate_platform_option(self, name: str) -> None: """ - Returns True if an option with this name is allowed in the + Raises an error if an option with this name is not allowed in the [tool.cibuildwheel.] section of a config file. """ disallowed_platform_options = self.disallow.get(self.platform, set()) if name in disallowed_platform_options: - return False + msg = f"{name!r} is not allowed in {disallowed_platform_options}" + raise ConfigOptionError(msg) allowed_option_names = self.default_options.keys() | self.default_platform_options.keys() - return name in allowed_option_names + if name not in allowed_option_names: + msg = f"Option {name!r} not supported in the {self.platform!r} section" + matches = difflib.get_close_matches(name, allowed_option_names, 1, 0.7) + if matches: + msg += f" Perhaps you meant {matches[0]!r}?" + raise ConfigOptionError(msg) def _load_file(self, filename: Path) -> tuple[dict[str, Any], dict[str, Any]]: """ @@ -290,7 +298,8 @@ def get( """ if name not in self.default_options and name not in self.default_platform_options: - raise ConfigOptionError(f"{name} must be in cibuildwheel/resources/defaults.toml file") + msg = f"{name!r} must be in cibuildwheel/resources/defaults.toml file to be accessed." + raise ConfigOptionError(msg) # Environment variable form envvar = f"CIBW_{name.upper().replace('-', '_')}" @@ -314,12 +323,12 @@ def get( if isinstance(result, dict): if table is None: - raise ConfigOptionError(f"{name} does not accept a table") + raise ConfigOptionError(f"{name!r} does not accept a table") return table["sep"].join(table["item"].format(k=k, v=v) for k, v in result.items()) if isinstance(result, list): if sep is None: - raise ConfigOptionError(f"{name} does not accept a list") + raise ConfigOptionError(f"{name!r} does not accept a list") return sep.join(result) if isinstance(result, int): @@ -393,7 +402,7 @@ def globals(self) -> GlobalOptions: container_engine_str = self.reader.get("container-engine") if container_engine_str not in ["docker", "podman"]: - msg = f"cibuildwheel: Unrecognised container_engine '{container_engine_str}', only 'docker' and 'podman' are supported" + msg = f"cibuildwheel: Unrecognised container_engine {container_engine_str!r}, only 'docker' and 'podman' are supported" print(msg, file=sys.stderr) sys.exit(2) @@ -437,7 +446,7 @@ def build_options(self, identifier: str | None) -> BuildOptions: elif build_frontend_str == "pip": build_frontend = "pip" else: - msg = f"cibuildwheel: Unrecognised build frontend '{build_frontend_str}', only 'pip' and 'build' are supported" + msg = f"cibuildwheel: Unrecognised build frontend {build_frontend_str!r}, only 'pip' and 'build' are supported" print(msg, file=sys.stderr) sys.exit(2) @@ -445,7 +454,7 @@ def build_options(self, identifier: str | None) -> BuildOptions: environment = parse_environment(environment_config) except (EnvironmentParseError, ValueError): print( - f'cibuildwheel: Malformed environment option "{environment_config}"', + f"cibuildwheel: Malformed environment option {environment_config!r}", file=sys.stderr, ) traceback.print_exc(None, sys.stderr) diff --git a/unit_test/options_toml_test.py b/unit_test/options_toml_test.py index a3fab2cc8..a0a1705d5 100644 --- a/unit_test/options_toml_test.py +++ b/unit_test/options_toml_test.py @@ -160,9 +160,28 @@ def test_unexpected_key(tmp_path): """ ) - with pytest.raises(ConfigOptionError): + with pytest.raises(ConfigOptionError) as excinfo: OptionsReader(pyproject_toml, platform="linux") + assert "repair-wheel-command" in str(excinfo.value) + + +def test_underscores_in_key(tmp_path): + # Note that platform contents are only checked when running + # for that platform. + pyproject_toml = tmp_path / "pyproject.toml" + pyproject_toml.write_text( + """ +[tool.cibuildwheel] +repair_wheel_command = "repair-project-linux" +""" + ) + + with pytest.raises(ConfigOptionError) as excinfo: + OptionsReader(pyproject_toml, platform="linux") + + assert "repair-wheel-command" in str(excinfo.value) + def test_unexpected_table(tmp_path): pyproject_toml = tmp_path / "pyproject.toml" From 8d5cb4bc1fc82f72bf57901ebd26781e9c814dbd Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 2 Aug 2022 20:46:57 +0200 Subject: [PATCH 15/28] doc: update github-with-qemu.yml example (#1206) - remove actions/setup-python step - bump docker/setup-qemu-action version --- examples/github-with-qemu.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index 1ba744d26..2911f98c8 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -13,14 +13,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - name: Install Python - with: - python-version: '3.7' - - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all From 35c795e4c6fcb627dc1b07998ee28f3310f9a768 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 2 Aug 2022 22:56:59 +0200 Subject: [PATCH 16/28] fix: update workflow (#1209) move the `pip-compile` command directly in `noxfile.py` --- bin/update_dependencies.py | 41 -------------------------------------- noxfile.py | 23 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 43 deletions(-) delete mode 100755 bin/update_dependencies.py diff --git a/bin/update_dependencies.py b/bin/update_dependencies.py deleted file mode 100755 index c0d7f2007..000000000 --- a/bin/update_dependencies.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python3 - -from __future__ import annotations - -import os -import shutil -import subprocess -import sys -from pathlib import Path - -DIR = Path(__file__).parent.resolve() -RESOURCES = DIR.parent / "cibuildwheel/resources" - -python_version = "".join(str(v) for v in sys.version_info[:2]) - -env = os.environ.copy() - -# CUSTOM_COMPILE_COMMAND is a pip-compile option that tells users how to -# regenerate the constraints files -env["CUSTOM_COMPILE_COMMAND"] = "bin/update_dependencies.py" - -os.chdir(DIR.parent) - -subprocess.run( - [ - "pip-compile", - "--allow-unsafe", - "--upgrade", - "cibuildwheel/resources/constraints.in", - f"--output-file=cibuildwheel/resources/constraints-python{python_version}.txt", - ], - check=True, - env=env, -) - -# default constraints.txt -if python_version == "39": - shutil.copyfile( - RESOURCES / f"constraints-python{python_version}.txt", - RESOURCES / "constraints.txt", - ) diff --git a/noxfile.py b/noxfile.py index 659e7ff52..142ea3fe9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -65,8 +65,27 @@ def update_constraints(session: nox.Session) -> None: """ Update the dependencies inplace. """ - session.install("requests", "pip-tools") - session.run("python", "bin/update_dependencies.py") + session.install("pip-tools") + assert isinstance(session.python, str) + python_version = session.python.replace(".", "") + env = os.environ.copy() + # CUSTOM_COMPILE_COMMAND is a pip-compile option that tells users how to + # regenerate the constraints files + env["CUSTOM_COMPILE_COMMAND"] = f"nox -s {session.name}" + session.run( + "pip-compile", + "--allow-unsafe", + "--upgrade", + "cibuildwheel/resources/constraints.in", + f"--output-file=cibuildwheel/resources/constraints-python{python_version}.txt", + env=env, + ) + if session.python == PYTHON_ALL_VERSIONS[-1]: + RESOURCES = DIR / "cibuildwheel" / "resources" + shutil.copyfile( + RESOURCES / f"constraints-python{python_version}.txt", + RESOURCES / "constraints.txt", + ) @nox.session From 61480e2264d2a11c9a0536b1ad6fbe209f79187a Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 6 Aug 2022 11:15:11 +0200 Subject: [PATCH 17/28] fix: don't build `universal2` as a default on macOS arm64 runners --- cibuildwheel/architecture.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cibuildwheel/architecture.py b/cibuildwheel/architecture.py index 82a78b30b..7b90ff947 100644 --- a/cibuildwheel/architecture.py +++ b/cibuildwheel/architecture.py @@ -66,10 +66,6 @@ def auto_archs(platform: PlatformName) -> set[Architecture]: if platform == "windows" and native_architecture == Architecture.AMD64: result.add(Architecture.x86) - if platform == "macos" and native_architecture == Architecture.arm64: - # arm64 can build and test both archs of a universal2 wheel. - result.add(Architecture.universal2) - return result @staticmethod From 03c8f5b741ca25a1ece914117bfe31b2eaa59c6f Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 8 Aug 2022 09:15:36 +0100 Subject: [PATCH 18/28] Docs/examples updates --- docs/faq.md | 11 +++++------ docs/options.md | 2 +- examples/github-apple-silicon.yml | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 07c5397ea..614e7ef6f 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -53,11 +53,11 @@ to load on Apple Silicon. available. Generally speaking, because Pip 20.3 is required for the `universal2` wheel, -most packages should provide both `x86_64` and `universal2` wheels for now. -Once Pip 20.3+ is common on macOS, then it should be possible to ship only the -`universal2` wheel. +most packages should provide both `x86_64` and one of `universal2`/`arm64` +wheels for now. When Pip 20.3+ is common on macOS, then it might be possible +to ship only the `universal2` wheel. -**Apple Silicon wheels are not built by default**, but can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64 universal2`. Cross-compilation is provided by the Xcode toolchain. +**Apple Silicon wheels are not built by default on Intel runners**, but can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain. !!! important When cross-compiling on Intel, it is not possible to test `arm64` and the `arm64` part of a `universal2` wheel. @@ -66,8 +66,7 @@ Once Pip 20.3+ is common on macOS, then it should be possible to ship only the Hopefully, cross-compilation is a temporary situation. Once we have widely available Apple Silicon CI runners, we can build and test `arm64` and -`universal2` wheels natively. That's why `universal2` wheels are not yet built -by default, and require opt-in by setting `CIBW_ARCHS_MACOS`. +`universal2` wheels natively. That's why `universal2`/`arm64` wheels require opt-in by setting `CIBW_ARCHS_MACOS`. !!! note Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`. diff --git a/docs/options.md b/docs/options.md index 75c2fd806..b6e0b0c5d 100644 --- a/docs/options.md +++ b/docs/options.md @@ -351,7 +351,7 @@ Default: `auto` | Linux / Intel | `x86_64` | `x86_64` `i686` | `x86_64` | `i686` | | Windows / Intel | `AMD64` | `AMD64` `x86` | `AMD64` | `x86` | | macOS / Intel | `x86_64` | `x86_64` | `x86_64` | | -| macOS / Apple Silicon | `arm64` | `arm64` `universal2` | `arm64` `universal2`| | +| macOS / Apple Silicon | `arm64` | `arm64` | `arm64` | | If not listed above, `auto` is the same as `native`. diff --git a/examples/github-apple-silicon.yml b/examples/github-apple-silicon.yml index 95154a33b..d810dfd68 100644 --- a/examples/github-apple-silicon.yml +++ b/examples/github-apple-silicon.yml @@ -12,7 +12,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.8.1 env: - CIBW_ARCHS_MACOS: x86_64 universal2 + CIBW_ARCHS_MACOS: x86_64 arm64 - uses: actions/upload-artifact@v3 with: From ac42f66a7234eaf9949f8c95870f918a532c9ca9 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 8 Aug 2022 18:20:57 +0100 Subject: [PATCH 19/28] Change expected_wheels to only expect universal2 when a flag is passed --- test/test_macos_archs.py | 2 +- test/utils.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test/test_macos_archs.py b/test/test_macos_archs.py index d3a56fb7a..fdd665c0e 100644 --- a/test/test_macos_archs.py +++ b/test/test_macos_archs.py @@ -11,7 +11,7 @@ ALL_MACOS_WHEELS = { *utils.expected_wheels("spam", "0.1.0", machine_arch="x86_64"), - *utils.expected_wheels("spam", "0.1.0", machine_arch="arm64"), + *utils.expected_wheels("spam", "0.1.0", machine_arch="arm64", include_universal2=True), } diff --git a/test/utils.py b/test/utils.py index 947c89689..5d6105164 100644 --- a/test/utils.py +++ b/test/utils.py @@ -116,6 +116,7 @@ def expected_wheels( macosx_deployment_target="10.9", machine_arch=None, python_abi_tags=None, + include_universal2=False, ): """ Returns a list of expected wheels from a run of cibuildwheel. @@ -199,14 +200,14 @@ def expected_wheels( arm64_macosx_deployment_target = _get_arm64_macosx_deployment_target( macosx_deployment_target ) - platform_tags = [ - f'macosx_{macosx_deployment_target.replace(".", "_")}_universal2', - f'macosx_{arm64_macosx_deployment_target.replace(".", "_")}_arm64', - ] + platform_tags = [f'macosx_{arm64_macosx_deployment_target.replace(".", "_")}_arm64'] else: - platform_tags = [ - f'macosx_{macosx_deployment_target.replace(".", "_")}_x86_64', - ] + platform_tags = [f'macosx_{macosx_deployment_target.replace(".", "_")}_x86_64'] + + if include_universal2: + platform_tags.append( + f'macosx_{macosx_deployment_target.replace(".", "_")}_universal2', + ) else: raise Exception("unsupported platform") From 66c8e84265ca1c4e3e51014e50d4337ac1fa1873 Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 16:51:14 -0400 Subject: [PATCH 20/28] [Bot] Update dependencies (#1213) Update dependencies Co-authored-by: cibuildwheel-bot[bot] <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> --- cibuildwheel/resources/build-platforms.toml | 24 +- .../resources/constraints-python310.txt | 10 +- .../resources/constraints-python311.txt | 10 +- .../resources/constraints-python36.txt | 6 +- .../resources/constraints-python37.txt | 10 +- .../resources/constraints-python38.txt | 10 +- .../resources/constraints-python39.txt | 10 +- cibuildwheel/resources/constraints.txt | 12 +- .../resources/pinned_docker_images.cfg | 64 +++--- cibuildwheel/resources/virtualenv.toml | 4 +- docs/working-examples.md | 212 +++++++++--------- 11 files changed, 179 insertions(+), 193 deletions(-) diff --git a/cibuildwheel/resources/build-platforms.toml b/cibuildwheel/resources/build-platforms.toml index 533c4db64..3670c98d2 100644 --- a/cibuildwheel/resources/build-platforms.toml +++ b/cibuildwheel/resources/build-platforms.toml @@ -81,12 +81,12 @@ python_configurations = [ { identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg" }, { identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg" }, { identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg" }, - { identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg" }, - { identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg" }, - { identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg" }, - { identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b4-macos11.pkg" }, - { identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b4-macos11.pkg" }, - { identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b4-macos11.pkg" }, + { identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg" }, + { identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg" }, + { identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg" }, + { identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b5-macos11.pkg" }, + { identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b5-macos11.pkg" }, + { identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b5-macos11.pkg" }, { identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" }, { identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.9-osx64.tar.bz2" }, { identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.9-osx64.tar.bz2" }, @@ -102,13 +102,13 @@ python_configurations = [ { identifier = "cp38-win_amd64", version = "3.8.10", arch = "64" }, { identifier = "cp39-win32", version = "3.9.13", arch = "32" }, { identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" }, - { identifier = "cp310-win32", version = "3.10.5", arch = "32" }, - { identifier = "cp310-win_amd64", version = "3.10.5", arch = "64" }, - { identifier = "cp311-win32", version = "3.11.0-b4", arch = "32" }, - { identifier = "cp311-win_amd64", version = "3.11.0-b4", arch = "64" }, + { identifier = "cp310-win32", version = "3.10.6", arch = "32" }, + { identifier = "cp310-win_amd64", version = "3.10.6", arch = "64" }, + { identifier = "cp311-win32", version = "3.11.0-b5", arch = "32" }, + { identifier = "cp311-win_amd64", version = "3.11.0-b5", arch = "64" }, { identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" }, - { identifier = "cp310-win_arm64", version = "3.10.5", arch = "ARM64" }, - { identifier = "cp311-win_arm64", version = "3.11.0-b4", arch = "ARM64" }, + { identifier = "cp310-win_arm64", version = "3.10.6", arch = "ARM64" }, + { identifier = "cp311-win_arm64", version = "3.11.0-b5", arch = "ARM64" }, { identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" }, { identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.9-win64.zip" }, { identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.9-win64.zip" }, diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index f3d3b7f9a..bb8a3ebfb 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.10 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.10 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -12,11 +12,9 @@ filelock==3.7.1 # via virtualenv platformdirs==2.5.2 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.3.0 # via delocate -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via @@ -24,7 +22,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.2 +pip==22.2.2 # via -r cibuildwheel/resources/constraints.in -setuptools==63.2.0 +setuptools==63.4.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index 849abf49e..e8de8fd7d 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.11 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.11 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -12,11 +12,9 @@ filelock==3.7.1 # via virtualenv platformdirs==2.5.2 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.3.0 # via delocate -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via @@ -24,7 +22,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.2 +pip==22.2.2 # via -r cibuildwheel/resources/constraints.in -setuptools==63.2.0 +setuptools==63.4.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python36.txt b/cibuildwheel/resources/constraints-python36.txt index 8ab9294ac..51328239d 100644 --- a/cibuildwheel/resources/constraints-python36.txt +++ b/cibuildwheel/resources/constraints-python36.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.6 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.6 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -16,13 +16,11 @@ importlib-resources==5.4.0 # via virtualenv platformdirs==2.4.0 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.1.1 # via # delocate # importlib-metadata -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index 78ea26b2c..4e9e975dd 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.7 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.7 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -14,13 +14,11 @@ importlib-metadata==4.12.0 # via virtualenv platformdirs==2.5.2 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.3.0 # via # delocate # importlib-metadata -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via @@ -30,7 +28,7 @@ zipp==3.8.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -pip==22.2 +pip==22.2.2 # via -r cibuildwheel/resources/constraints.in -setuptools==63.2.0 +setuptools==63.4.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index aa06de6ee..24f5a698e 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.8 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.8 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -12,11 +12,9 @@ filelock==3.7.1 # via virtualenv platformdirs==2.5.2 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.3.0 # via delocate -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via @@ -24,7 +22,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.2 +pip==22.2.2 # via -r cibuildwheel/resources/constraints.in -setuptools==63.2.0 +setuptools==63.4.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index 0aed606e5..9ad88f0d0 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.9 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.9 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -12,11 +12,9 @@ filelock==3.7.1 # via virtualenv platformdirs==2.5.2 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.3.0 # via delocate -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via @@ -24,7 +22,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.2 +pip==22.2.2 # via -r cibuildwheel/resources/constraints.in -setuptools==63.2.0 +setuptools==63.4.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index 0aed606e5..e8de8fd7d 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with python 3.9 +# This file is autogenerated by pip-compile with python 3.11 # To update, run: # -# bin/update_dependencies.py +# nox -s update_constraints-3.11 # delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in @@ -12,11 +12,9 @@ filelock==3.7.1 # via virtualenv platformdirs==2.5.2 # via virtualenv -six==1.16.0 - # via virtualenv typing-extensions==4.3.0 # via delocate -virtualenv==20.15.1 +virtualenv==20.16.3 # via -r cibuildwheel/resources/constraints.in wheel==0.37.1 # via @@ -24,7 +22,7 @@ wheel==0.37.1 # delocate # The following packages are considered to be unsafe in a requirements file: -pip==22.2 +pip==22.2.2 # via -r cibuildwheel/resources/constraints.in -setuptools==63.2.0 +setuptools==63.4.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 1fe4bf412..e9a7e188e 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,48 +1,48 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-07-17-f8ddacc -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-07-21-947f13c -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-07-21-947f13c -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-07-21-947f13c -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-07-21-947f13c +manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-08-08-7292f33 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-08-07-986762e +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-08-07-986762e +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-08-07-986762e [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2022-07-17-f8ddacc -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-07-21-947f13c -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-07-21-947f13c -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-07-21-947f13c +manylinux1 = quay.io/pypa/manylinux1_i686:2022-08-08-7292f33 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-08-07-986762e +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-08-07-986762e [pypy_x86_64] -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-07-21-947f13c -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-07-21-947f13c -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-07-21-947f13c +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-08-07-986762e +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-08-07-986762e [pypy_i686] -manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-07-21-947f13c -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-07-21-947f13c +manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-08-07-986762e [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-07-21-947f13c -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-07-21-947f13c -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-08-07-986762e +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-08-07-986762e +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-08-07-986762e [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-07-21-947f13c -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-07-21-947f13c -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-08-07-986762e +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-08-07-986762e +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-08-07-986762e [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-07-21-947f13c -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-08-07-986762e +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-08-07-986762e [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-07-21-947f13c -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-07-21-947f13c -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-07-21-947f13c +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-08-07-986762e +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-08-07-986762e +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-08-07-986762e diff --git a/cibuildwheel/resources/virtualenv.toml b/cibuildwheel/resources/virtualenv.toml index c9ae14afa..c14592cd8 100644 --- a/cibuildwheel/resources/virtualenv.toml +++ b/cibuildwheel/resources/virtualenv.toml @@ -1,2 +1,2 @@ -version = "20.15.1" -url = "https://github.com/pypa/get-virtualenv/blob/20.15.1/public/virtualenv.pyz?raw=true" +version = "20.16.3" +url = "https://github.com/pypa/get-virtualenv/blob/20.16.3/public/virtualenv.pyz?raw=true" diff --git a/docs/working-examples.md b/docs/working-examples.md index 63b34bb81..e5e23bd6c 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -40,8 +40,8 @@ title: Working examples | [pyzmq][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python bindings for zeromq, the networking library. Uses Cython and CFFI. | | [aiortc][] | ![github icon][] | ![apple icon][] ![linux icon][] | WebRTC and ORTC implementation for Python using asyncio. | | [vispy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Main repository for Vispy | -| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` | | [Implicit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes GPU support for linux wheels | +| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` | | [tinyobjloader][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Tiny but powerful single file wavefront obj loader | | [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI | | [coverage.py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The coverage tool for Python | @@ -60,8 +60,8 @@ title: Working examples | [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python | | [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. | | [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) | -| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data | | [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python | +| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data | | [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. | | [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system | @@ -74,8 +74,8 @@ title: Working examples | [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. | | [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub | | [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system | -| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. | | [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. | +| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. | | [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. | | [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing | | [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. | @@ -96,8 +96,8 @@ title: Working examples | [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. | | [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions | | [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. | -| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. | | [pillow-heif][] | ![github icon][] | ![apple icon][] ![linux icon][] | Python CFFI binding to libheif library with third party dependencies like `libde265`, `x265`, `libaom` with test & publishing on PyPi. | +| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. | | [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis | | [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy | | [pyjet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The interface between FastJet and NumPy | @@ -141,8 +141,8 @@ title: Working examples [pyzmq]: https://github.com/zeromq/pyzmq [aiortc]: https://github.com/aiortc/aiortc [vispy]: https://github.com/vispy/vispy -[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python [Implicit]: https://github.com/benfred/implicit +[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python [tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader [Dependency Injector]: https://github.com/ets-labs/python-dependency-injector [coverage.py]: https://github.com/nedbat/coveragepy @@ -161,8 +161,8 @@ title: Working examples [aioquic]: https://github.com/aiortc/aioquic [ruptures]: https://github.com/deepcharles/ruptures [DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest -[google neuroglancer]: https://github.com/google/neuroglancer [Psycopg 3]: https://github.com/psycopg/psycopg +[google neuroglancer]: https://github.com/google/neuroglancer [Parselmouth]: https://github.com/YannickJadoul/Parselmouth [AutoPy]: https://github.com/autopilot-rs/autopy [H3-py]: https://github.com/uber/h3-py @@ -175,8 +175,8 @@ title: Working examples [tgcalls]: https://github.com/MarshalX/tgcalls [dd-trace-py]: https://github.com/DataDog/dd-trace-py [pybind11 python_example]: https://github.com/pybind/python_example -[sourmash]: https://github.com/dib-lab/sourmash [time-machine]: https://github.com/adamchainz/time-machine +[sourmash]: https://github.com/dib-lab/sourmash [CTranslate2]: https://github.com/OpenNMT/CTranslate2 [cyvcf2]: https://github.com/brentp/cyvcf2 [matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile @@ -197,8 +197,8 @@ title: Working examples [polaroid]: https://github.com/daggy1234/polaroid [cf-units]: https://github.com/SciTools/cf-units [Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build -[clang-format]: https://github.com/ssciwr/clang-format-wheel [pillow-heif]: https://github.com/bigcat88/pillow_heif +[clang-format]: https://github.com/ssciwr/clang-format-wheel [power-grid-model]: https://github.com/alliander-opensource/power-grid-model [numpythia]: https://github.com/scikit-hep/numpythia [pyjet]: https://github.com/scikit-hep/pyjet @@ -220,106 +220,106 @@ title: Working examples [apple icon]: data/readme_icons/apple.svg [linux icon]: data/readme_icons/linux.svg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + From caeb0c23cc53d6df62af63bbca204f69973f836b Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 8 Aug 2022 22:21:22 +0100 Subject: [PATCH 21/28] Remove pytest-azurepipelines for now Test errors in Azure are all printing KeyError: 'reason', it seems to be an incompatibility between pytest-azurepipelines and pytest-xdist. I've filed a bug here: https://github.com/Azure/pytest-azurepipelines/issues/71 in the meantime, I'll disable this plugin. --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f8142ce80..70275815a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ jobs: inputs: versionSpec: '3.8' - bash: | - python -m pip install -e ".[dev]" pytest-azurepipelines + python -m pip install -e ".[dev]" python ./bin/run_tests.py - job: macos_38 @@ -17,7 +17,7 @@ jobs: inputs: versionSpec: '3.8' - bash: | - python -m pip install -e ".[dev]" pytest-azurepipelines + python -m pip install -e ".[dev]" python ./bin/run_tests.py - job: windows_38 @@ -28,5 +28,5 @@ jobs: inputs: versionSpec: '3.8' - bash: | - python -m pip install -e ".[dev]" pytest-azurepipelines + python -m pip install -e ".[dev]" python ./bin/run_tests.py From 462ba084ce697426e886e2b74f2489d63af4581e Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Tue, 9 Aug 2022 06:09:10 +0200 Subject: [PATCH 22/28] chore: run update workflow on pull request (#1210) Allows to catch issues with the update workflow with related PRs. --- .github/workflows/update-dependencies.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 208b36c48..c2fcada5c 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -1,6 +1,15 @@ name: Update dependencies on: + pull_request: + paths: + - '.github/workflows/update-dependencies.yml' + - 'bin/update_pythons.py' + - 'bin/update_docker.py' + - 'bin/update_virtualenv.py' + - 'bin/projects.py' + - 'docs/data/projects.yml' + - 'noxfile.py' workflow_dispatch: schedule: - cron: '0 6 * * 1' # "At 06:00 on Monday." From 9ab7670f54835ab9eb609c556e6c0cb4550e94e1 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 9 Aug 2022 00:09:48 -0400 Subject: [PATCH 23/28] ci: use official nox action --- .github/workflows/update-dependencies.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 208b36c48..12bb2fe30 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + + - uses: wntrblm/nox@2022.8.7 with: - python-version: "3.11-dev" - - uses: excitedleigh/setup-nox@v2.1.0 + python-versions: "3.6, 3.7, 3.8, 3.9, 3.10, 3.11-dev" - name: "Run update: dependencies" run: nox --force-color -s update_constraints From 024ac0f0ebdfda3785a4379f551b538618a29b36 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 01:15:30 -0400 Subject: [PATCH 24/28] [pre-commit.ci] pre-commit autoupdate (#1211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v2.37.2 → v2.37.3](https://github.com/asottile/pyupgrade/compare/v2.37.2...v2.37.3) - [github.com/hadialqattan/pycln: v2.0.4 → v2.1.1](https://github.com/hadialqattan/pycln/compare/v2.0.4...v2.1.1) - [github.com/asottile/setup-cfg-fmt: v1.20.2 → v2.0.0](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.2...v2.0.0) - [github.com/asottile/yesqa: v1.3.0 → v1.4.0](https://github.com/asottile/yesqa/compare/v1.3.0...v1.4.0) - [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.4) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update .pre-commit-config.yaml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner --- .pre-commit-config.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3e480da9..41f2bcaa0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v2.37.2 + rev: v2.37.3 hooks: - id: pyupgrade args: ["--py37-plus"] @@ -22,7 +22,7 @@ repos: # Autoremoves unused imports - repo: https://github.com/hadialqattan/pycln - rev: v2.0.4 + rev: v2.1.1 hooks: - id: pycln args: [--all] @@ -41,9 +41,10 @@ repos: - id: black - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.2 + rev: v2.0.0 hooks: - id: setup-cfg-fmt + args: [--include-version-classifiers, --max-py-version=3.10] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.971 @@ -73,14 +74,14 @@ repos: additional_dependencies: *mypy-dependencies - repo: https://github.com/asottile/yesqa - rev: v1.3.0 + rev: v1.4.0 hooks: - id: yesqa additional_dependencies: &flake8-dependencies - flake8-bugbear - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 5.0.4 hooks: - id: flake8 exclude: cibuildwheel/resources/ From e2c0d6831d53fffca56770a0f7db9fa9480f8448 Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Wed, 10 Aug 2022 17:25:27 +0000 Subject: [PATCH 25/28] Update dependencies --- cibuildwheel/resources/build-platforms.toml | 12 +- .../resources/constraints-python310.txt | 2 +- .../resources/constraints-python311.txt | 2 +- .../resources/constraints-python37.txt | 2 +- .../resources/constraints-python38.txt | 2 +- .../resources/constraints-python39.txt | 2 +- cibuildwheel/resources/constraints.txt | 2 +- .../resources/pinned_docker_images.cfg | 52 ++--- docs/working-examples.md | 210 +++++++++--------- 9 files changed, 143 insertions(+), 143 deletions(-) diff --git a/cibuildwheel/resources/build-platforms.toml b/cibuildwheel/resources/build-platforms.toml index 3670c98d2..ff6b5ea77 100644 --- a/cibuildwheel/resources/build-platforms.toml +++ b/cibuildwheel/resources/build-platforms.toml @@ -84,9 +84,9 @@ python_configurations = [ { identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg" }, { identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg" }, { identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg" }, - { identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b5-macos11.pkg" }, - { identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b5-macos11.pkg" }, - { identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0b5-macos11.pkg" }, + { identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0rc1-macos11.pkg" }, + { identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0rc1-macos11.pkg" }, + { identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.0/python-3.11.0rc1-macos11.pkg" }, { identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" }, { identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.9-osx64.tar.bz2" }, { identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.9-osx64.tar.bz2" }, @@ -104,11 +104,11 @@ python_configurations = [ { identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" }, { identifier = "cp310-win32", version = "3.10.6", arch = "32" }, { identifier = "cp310-win_amd64", version = "3.10.6", arch = "64" }, - { identifier = "cp311-win32", version = "3.11.0-b5", arch = "32" }, - { identifier = "cp311-win_amd64", version = "3.11.0-b5", arch = "64" }, + { identifier = "cp311-win32", version = "3.11.0-rc1", arch = "32" }, + { identifier = "cp311-win_amd64", version = "3.11.0-rc1", arch = "64" }, { identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" }, { identifier = "cp310-win_arm64", version = "3.10.6", arch = "ARM64" }, - { identifier = "cp311-win_arm64", version = "3.11.0-b5", arch = "ARM64" }, + { identifier = "cp311-win_arm64", version = "3.11.0-rc1", arch = "ARM64" }, { identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" }, { identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.9-win64.zip" }, { identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.9-win64.zip" }, diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index bb8a3ebfb..654881883 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -8,7 +8,7 @@ delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in distlib==0.3.5 # via virtualenv -filelock==3.7.1 +filelock==3.8.0 # via virtualenv platformdirs==2.5.2 # via virtualenv diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index e8de8fd7d..47b2579a1 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -8,7 +8,7 @@ delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in distlib==0.3.5 # via virtualenv -filelock==3.7.1 +filelock==3.8.0 # via virtualenv platformdirs==2.5.2 # via virtualenv diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index 4e9e975dd..825991e64 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -8,7 +8,7 @@ delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in distlib==0.3.5 # via virtualenv -filelock==3.7.1 +filelock==3.8.0 # via virtualenv importlib-metadata==4.12.0 # via virtualenv diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index 24f5a698e..a9c99ed01 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -8,7 +8,7 @@ delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in distlib==0.3.5 # via virtualenv -filelock==3.7.1 +filelock==3.8.0 # via virtualenv platformdirs==2.5.2 # via virtualenv diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index 9ad88f0d0..7f49670e2 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -8,7 +8,7 @@ delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in distlib==0.3.5 # via virtualenv -filelock==3.7.1 +filelock==3.8.0 # via virtualenv platformdirs==2.5.2 # via virtualenv diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index e8de8fd7d..47b2579a1 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -8,7 +8,7 @@ delocate==0.10.2 # via -r cibuildwheel/resources/constraints.in distlib==0.3.5 # via virtualenv -filelock==3.7.1 +filelock==3.8.0 # via virtualenv platformdirs==2.5.2 # via virtualenv diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index e9a7e188e..8fdb63fbb 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,48 +1,48 @@ [x86_64] manylinux1 = quay.io/pypa/manylinux1_x86_64:2022-08-08-7292f33 manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-08-07-986762e -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-08-07-986762e -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-08-09-51a01be +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-08-09-51a01be +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2022-08-09-51a01be [i686] manylinux1 = quay.io/pypa/manylinux1_i686:2022-08-08-7292f33 manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-08-07-986762e -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-08-09-51a01be +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2022-08-09-51a01be [pypy_x86_64] manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-08-07-986762e -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-08-09-51a01be +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2022-08-09-51a01be [pypy_i686] manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_i686:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-08-09-51a01be [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-08-07-986762e -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-08-07-986762e -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-08-09-51a01be +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-08-09-51a01be +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2022-08-09-51a01be [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-08-07-986762e -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-08-07-986762e -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-08-09-51a01be +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2022-08-09-51a01be +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2022-08-09-51a01be [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-08-07-986762e -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-08-09-51a01be +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2022-08-09-51a01be [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-08-07-986762e -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-08-07-986762e -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-08-07-986762e +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2022-08-09-51a01be +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-08-09-51a01be +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2022-08-09-51a01be diff --git a/docs/working-examples.md b/docs/working-examples.md index e5e23bd6c..eb68e50dc 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -23,16 +23,16 @@ title: Working examples | [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python | | [vaex][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀 | | [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library | -| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. | | [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System | +| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. | | [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. | | [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. | | [scikit-image][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Image processing library. Uses cibuildwheel to build and test a project that uses Cython with platform-native code. | | [cmake][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. | | [twisted-iocpsupport][] | ![github icon][] | ![windows icon][] | A submodule of Twisted that hooks into native C APIs using Cython. | | [websockets][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Library for building WebSocket servers and clients. Mostly written in Python, with a small C 'speedups' extension module. | -| [cvxpy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A Python-embedded modeling language for convex optimization problems. | | [PyOxidizer][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A modern Python application packaging and distribution tool | +| [cvxpy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A Python-embedded modeling language for convex optimization problems. | | [Triton][] | ![github icon][] | ![linux icon][] | Self hosted runners | | [UltraJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Ultra fast JSON decoder and encoder written in C with Python bindings | | [River][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | 🌊 Online machine learning in Python | @@ -78,8 +78,8 @@ title: Working examples | [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. | | [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. | | [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing | -| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. | | [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. | +| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. | | [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq | | [iminuit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Jupyter-friendly Python interface for C++ MINUIT2 | | [Tokenizer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support | @@ -97,8 +97,8 @@ title: Working examples | [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions | | [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. | | [pillow-heif][] | ![github icon][] | ![apple icon][] ![linux icon][] | Python CFFI binding to libheif library with third party dependencies like `libde265`, `x265`, `libaom` with test & publishing on PyPi. | -| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. | | [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis | +| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. | | [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy | | [pyjet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The interface between FastJet and NumPy | | [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 | @@ -124,16 +124,16 @@ title: Working examples [psutil]: https://github.com/giampaolo/psutil [vaex]: https://github.com/vaexio/vaex [Google Benchmark]: https://github.com/google/benchmark -[Apache Beam]: https://github.com/apache/beam [duckdb]: https://github.com/duckdb/duckdb +[Apache Beam]: https://github.com/apache/beam [asyncpg]: https://github.com/MagicStack/asyncpg [PyGame]: https://github.com/pygame/pygame [scikit-image]: https://github.com/scikit-image/scikit-image [cmake]: https://github.com/scikit-build/cmake-python-distributions [twisted-iocpsupport]: https://github.com/twisted/twisted-iocpsupport [websockets]: https://github.com/aaugustin/websockets -[cvxpy]: https://github.com/cvxpy/cvxpy [PyOxidizer]: https://github.com/indygreg/PyOxidizer +[cvxpy]: https://github.com/cvxpy/cvxpy [Triton]: https://github.com/openai/triton [UltraJSON]: https://github.com/ultrajson/ultrajson [River]: https://github.com/online-ml/river @@ -179,8 +179,8 @@ title: Working examples [sourmash]: https://github.com/dib-lab/sourmash [CTranslate2]: https://github.com/OpenNMT/CTranslate2 [cyvcf2]: https://github.com/brentp/cyvcf2 -[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile [abess]: https://github.com/abess-team/abess +[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile [jq.py]: https://github.com/mwilliamson/jq.py [iminuit]: https://github.com/scikit-hep/iminuit [Tokenizer]: https://github.com/OpenNMT/Tokenizer @@ -198,8 +198,8 @@ title: Working examples [cf-units]: https://github.com/SciTools/cf-units [Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build [pillow-heif]: https://github.com/bigcat88/pillow_heif -[clang-format]: https://github.com/ssciwr/clang-format-wheel [power-grid-model]: https://github.com/alliander-opensource/power-grid-model +[clang-format]: https://github.com/ssciwr/clang-format-wheel [numpythia]: https://github.com/scikit-hep/numpythia [pyjet]: https://github.com/scikit-hep/pyjet [pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example @@ -220,106 +220,106 @@ title: Working examples [apple icon]: data/readme_icons/apple.svg [linux icon]: data/readme_icons/linux.svg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - + + From 30bfc7b2b2253ed668afb3bc77e7820e7588c27f Mon Sep 17 00:00:00 2001 From: Keming Date: Thu, 11 Aug 2022 08:44:35 +0800 Subject: [PATCH 26/28] chore: add two ML example projects Signed-off-by: Keming --- docs/data/projects.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/data/projects.yml b/docs/data/projects.yml index b08d6fc46..19b6d5250 100644 --- a/docs/data/projects.yml +++ b/docs/data/projects.yml @@ -594,3 +594,15 @@ gh: SciTools/cf-units ci: [github] os: [apple, linux] + +- name: envd + gh: tensorchord/envd + ci: [github] + os: [apple, linux, windows] + note: A machine learning development environment build toool + +- name: mosec + gh: mosecorg/mosec + ci: [github] + os: [linux, apple] + note: A machine learning model serving framework powered by Rust From 2d155c01b574ce6903a7d76d22e8f2b0fd24ec22 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 11 Aug 2022 09:21:34 +0200 Subject: [PATCH 27/28] Build cp311 without setting prerelease_pythons --- README.md | 2 +- cibuildwheel/util.py | 2 +- unit_test/build_selector_test.py | 4 ++-- unit_test/linux_build_steps_test.py | 8 ++++++-- unit_test/option_prepare_test.py | 10 ++++------ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index fecef3366..dc013f2ce 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ What does it do? ¹ PyPy is only supported for manylinux wheels.
² Windows arm64 support is experimental.
³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.
-⁴ CPython 3.11 is available using the [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) option.
+⁴ CPython 3.11 is built by default using Python 3.11.0rc1, starting with cibuildwheel 2.9.
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy - Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, and GitLab CI diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py index 6a6a6e2a4..62422201c 100644 --- a/cibuildwheel/util.py +++ b/cibuildwheel/util.py @@ -242,7 +242,7 @@ class BuildSelector: requires_python: SpecifierSet | None = None # a pattern that skips prerelease versions, when include_prereleases is False. - PRERELEASE_SKIP: ClassVar[str] = "cp311-*" + PRERELEASE_SKIP: ClassVar[str] = "" prerelease_pythons: bool = False def __call__(self, build_id: str) -> bool: diff --git a/unit_test/build_selector_test.py b/unit_test/build_selector_test.py index 14ff8da63..3e544900c 100644 --- a/unit_test/build_selector_test.py +++ b/unit_test/build_selector_test.py @@ -11,7 +11,7 @@ def test_build(): assert build_selector("cp36-manylinux_x86_64") assert build_selector("cp37-manylinux_x86_64") assert build_selector("cp310-manylinux_x86_64") - assert not build_selector("cp311-manylinux_x86_64") + assert build_selector("cp311-manylinux_x86_64") assert build_selector("pp36-manylinux_x86_64") assert build_selector("pp37-manylinux_x86_64") assert build_selector("cp36-manylinux_i686") @@ -30,7 +30,7 @@ def test_build(): assert build_selector("cp36-win_amd64") assert build_selector("cp37-win_amd64") assert build_selector("cp310-win_amd64") - assert not build_selector("cp311-win_amd64") + assert build_selector("cp311-win_amd64") assert not build_selector("pp36-win_amd64") assert not build_selector("pp37-win_amd64") diff --git a/unit_test/linux_build_steps_test.py b/unit_test/linux_build_steps_test.py index 809cdf650..8423d423c 100644 --- a/unit_test/linux_build_steps_test.py +++ b/unit_test/linux_build_steps_test.py @@ -60,8 +60,12 @@ def before_alls(step): pprint(build_steps) assert build_steps[0].container_image == "normal_container_image" - assert identifiers(build_steps[0]) == ["cp36-manylinux_x86_64", "cp37-manylinux_x86_64"] - assert before_alls(build_steps[0]) == ["", ""] + assert identifiers(build_steps[0]) == [ + "cp36-manylinux_x86_64", + "cp37-manylinux_x86_64", + "cp311-manylinux_x86_64", + ] + assert before_alls(build_steps[0]) == ["", "", ""] assert build_steps[1].container_image == "other_container_image" assert identifiers(build_steps[1]) == ["cp38-manylinux_x86_64", "cp310-manylinux_x86_64"] diff --git a/unit_test/option_prepare_test.py b/unit_test/option_prepare_test.py index bc01317b3..9b21d3295 100644 --- a/unit_test/option_prepare_test.py +++ b/unit_test/option_prepare_test.py @@ -13,7 +13,7 @@ from cibuildwheel import linux, util from cibuildwheel.__main__ import main -ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "pp37", "pp38", "pp39"} +ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39"} @pytest.fixture @@ -137,7 +137,8 @@ def test_build_with_override_launches(mock_build_container, monkeypatch, tmp_pat identifiers = {x.identifier for x in kwargs["platform_configs"]} assert identifiers == { - f"{x}-manylinux_x86_64" for x in ALL_IDS - {"cp36", "cp310", "pp37", "pp38", "pp39"} + f"{x}-manylinux_x86_64" + for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39"} } assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == "" @@ -147,10 +148,7 @@ def test_build_with_override_launches(mock_build_container, monkeypatch, tmp_pat assert not kwargs["container"]["simulate_32_bit"] identifiers = {x.identifier for x in kwargs["platform_configs"]} assert identifiers == { - "cp310-manylinux_x86_64", - "pp37-manylinux_x86_64", - "pp38-manylinux_x86_64", - "pp39-manylinux_x86_64", + f"{x}-manylinux_x86_64" for x in {"cp310", "cp311", "pp37", "pp38", "pp39"} } kwargs = build_in_container.call_args_list[3][1] From 0abd6c205d5baf3066155b5bf85219147d770c61 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Thu, 11 Aug 2022 19:43:33 +0100 Subject: [PATCH 28/28] Bump version: v2.9.0 --- README.md | 21 +++++++++++---------- cibuildwheel/__init__.py | 2 +- docs/changelog.md | 9 +++++++++ docs/faq.md | 4 ++-- docs/setup.md | 4 ++-- examples/appveyor-minimal.yml | 2 +- examples/azure-pipelines-minimal.yml | 6 +++--- examples/circleci-minimal.yml | 4 ++-- examples/github-apple-silicon.yml | 2 +- examples/github-deploy.yml | 2 +- examples/github-minimal.yml | 2 +- examples/github-with-qemu.yml | 2 +- examples/gitlab-minimal.yml | 2 +- examples/travis-ci-deploy.yml | 2 +- examples/travis-ci-minimal.yml | 2 +- examples/travis-ci-test-and-deploy.yml | 4 ++-- setup.cfg | 2 +- 17 files changed, 41 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index dc013f2ce..69c8a79c6 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ What does it do? | CPython 3.8 | ✅ | ✅ | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅³ | ✅ | ✅ | ✅ | ✅ | | CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.11⁴ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | | PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.8 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.9 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | @@ -37,7 +37,6 @@ What does it do? ¹ PyPy is only supported for manylinux wheels.
² Windows arm64 support is experimental.
³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.
-⁴ CPython 3.11 is built by default using Python 3.11.0rc1, starting with cibuildwheel 2.9.
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy - Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, and GitLab CI @@ -89,7 +88,7 @@ jobs: - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.8.1 + run: python -m pip install cibuildwheel==2.9.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse @@ -204,6 +203,15 @@ Changelog +### v2.9.0 + +_11 August 2022_ + +- 🌟 CPython 3.11 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.11.0rc1, which is guaranteed to be ABI compatible with the final release. (#1226) +- ⚠️ Removed support for running cibuildwheel in Python 3.6. Python 3.6 is EOL. However, cibuildwheel continues to build CPython 3.6 wheels for the moment. (#1175) +- ✨ Improved error messages when misspelling TOML options, suggesting close matches (#1205) +- 🛠 When running on Apple Silicon (so far, an unsupported mode of operation), cibuildwheel no longer builds universal2 wheels by default - just arm64. See [#1204](https://github.com/pypa/cibuildwheel/issues/1204) for discussion. We hope to release official support for native builds on Apple Silicon soon! (#1217) + ### v2.8.1 _18 July 2022_ @@ -241,13 +249,6 @@ _7 June 2022_ - 🛠 Update the prerelease CPython 3.11 to 3.11.0b3 -### v2.6.0 - -_25 May 2022_ - -- 🌟 Added the ability to test building wheels on CPython 3.11! Because CPython 3.11 is in beta, these wheels should not be distributed, because they might not be compatible with the final release, but it's available to build for testing purposes. Use the flag [`--prerelease-pythons` or `CIBW_PRERELEASE_PYTHONS`](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) to test. This version of cibuildwheel includes CPython 3.11.0b1. (#1109) -- 📚 Added an interactive diagram showing how cibuildwheel works to the [docs](https://cibuildwheel.readthedocs.io/en/stable/#how-it-works) (#1100) - --- diff --git a/cibuildwheel/__init__.py b/cibuildwheel/__init__.py index b923f2287..a4f6f3705 100644 --- a/cibuildwheel/__init__.py +++ b/cibuildwheel/__init__.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.8.1" +__version__ = "2.9.0" diff --git a/docs/changelog.md b/docs/changelog.md index 6f1da5e44..1bce05a9a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,15 @@ title: Changelog --- +### v2.9.0 + +_11 August 2022_ + +- 🌟 CPython 3.11 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.11.0rc1, which is guaranteed to be ABI compatible with the final release. (#1226) +- ⚠️ Removed support for running cibuildwheel in Python 3.6. Python 3.6 is EOL. However, cibuildwheel continues to build CPython 3.6 wheels for the moment. (#1175) +- ✨ Improved error messages when misspelling TOML options, suggesting close matches (#1205) +- 🛠 When running on Apple Silicon (so far, an unsupported mode of operation), cibuildwheel no longer builds universal2 wheels by default - just arm64. See [#1204](https://github.com/pypa/cibuildwheel/issues/1204) for discussion. We hope to release official support for native builds on Apple Silicon soon! (#1217) + ### v2.8.1 _18 July 2022_ diff --git a/docs/faq.md b/docs/faq.md index 614e7ef6f..85314cd34 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -132,7 +132,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead If you use GitHub Actions for builds, you can use cibuildwheel as an action: ```yaml -uses: pypa/cibuildwheel@v2.8.1 +uses: pypa/cibuildwheel@v2.9.0 ``` This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal. @@ -154,7 +154,7 @@ The second option, and the only one that supports other CI systems, is using a ` ```bash # requirements-cibw.txt -cibuildwheel==2.8.1 +cibuildwheel==2.9.0 ``` Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this: diff --git a/docs/setup.md b/docs/setup.md index 91d44960f..2dce1f5b5 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -182,7 +182,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/checkout@v3 - name: Build wheels - run: pipx run cibuildwheel==2.8.1 + run: pipx run cibuildwheel==2.9.0 - uses: actions/upload-artifact@v3 with: @@ -217,7 +217,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.8.1 + run: python -m pip install cibuildwheel==2.9.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/appveyor-minimal.yml b/examples/appveyor-minimal.yml index cd47745dc..99e4f91bb 100644 --- a/examples/appveyor-minimal.yml +++ b/examples/appveyor-minimal.yml @@ -12,7 +12,7 @@ stack: python 3.7 init: - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% -install: python -m pip install cibuildwheel==2.8.1 +install: python -m pip install cibuildwheel==2.9.0 build_script: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/azure-pipelines-minimal.yml b/examples/azure-pipelines-minimal.yml index d9f837f95..46ee3959f 100644 --- a/examples/azure-pipelines-minimal.yml +++ b/examples/azure-pipelines-minimal.yml @@ -6,7 +6,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - pip3 install cibuildwheel==2.8.1 + pip3 install cibuildwheel==2.9.0 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -20,7 +20,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - python3 -m pip install cibuildwheel==2.8.1 + python3 -m pip install cibuildwheel==2.9.0 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -34,7 +34,7 @@ jobs: - bash: | set -o errexit python -m pip install --upgrade pip - pip install cibuildwheel==2.8.1 + pip install cibuildwheel==2.9.0 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels diff --git a/examples/circleci-minimal.yml b/examples/circleci-minimal.yml index 3162ceb55..a1478974d 100644 --- a/examples/circleci-minimal.yml +++ b/examples/circleci-minimal.yml @@ -11,7 +11,7 @@ jobs: - run: name: Build the Linux wheels. command: | - pip3 install --user cibuildwheel==2.8.1 + pip3 install --user cibuildwheel==2.9.0 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -25,7 +25,7 @@ jobs: - run: name: Build the OS X wheels. command: | - pip3 install cibuildwheel==2.8.1 + pip3 install cibuildwheel==2.9.0 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ diff --git a/examples/github-apple-silicon.yml b/examples/github-apple-silicon.yml index d810dfd68..c212bfd70 100644 --- a/examples/github-apple-silicon.yml +++ b/examples/github-apple-silicon.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.8.1 + uses: pypa/cibuildwheel@v2.9.0 env: CIBW_ARCHS_MACOS: x86_64 arm64 diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index 75b8cd1c5..8ef915732 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.8.1 + uses: pypa/cibuildwheel@v2.9.0 - uses: actions/upload-artifact@v3 with: diff --git a/examples/github-minimal.yml b/examples/github-minimal.yml index e1e1f99b5..f5ba352d2 100644 --- a/examples/github-minimal.yml +++ b/examples/github-minimal.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.8.1 + uses: pypa/cibuildwheel@v2.9.0 # env: # CIBW_SOME_OPTION: value # ... diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index 2911f98c8..f70add945 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -20,7 +20,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.8.1 + uses: pypa/cibuildwheel@v2.9.0 env: # configure cibuildwheel to build native archs ('auto'), and some # emulated ones diff --git a/examples/gitlab-minimal.yml b/examples/gitlab-minimal.yml index 5c9879656..7e9aa5162 100644 --- a/examples/gitlab-minimal.yml +++ b/examples/gitlab-minimal.yml @@ -12,7 +12,7 @@ linux: DOCKER_TLS_CERTDIR: "" script: - curl -sSL https://get.docker.com/ | sh - - python -m pip install cibuildwheel==2.8.1 + - python -m pip install cibuildwheel==2.9.0 - cibuildwheel --output-dir wheelhouse artifacts: paths: diff --git a/examples/travis-ci-deploy.yml b/examples/travis-ci-deploy.yml index 663080abe..3aac30e7a 100644 --- a/examples/travis-ci-deploy.yml +++ b/examples/travis-ci-deploy.yml @@ -19,7 +19,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.8.1 + - python3 -m pip install cibuildwheel==2.9.0 script: # build the wheels, put them into './dist' diff --git a/examples/travis-ci-minimal.yml b/examples/travis-ci-minimal.yml index 9ca1fee19..010f3c8c0 100644 --- a/examples/travis-ci-minimal.yml +++ b/examples/travis-ci-minimal.yml @@ -25,7 +25,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.8.1 + - python3 -m pip install cibuildwheel==2.9.0 script: # build the wheels, put them into './wheelhouse' diff --git a/examples/travis-ci-test-and-deploy.yml b/examples/travis-ci-test-and-deploy.yml index 42a27954c..7271bdaaa 100644 --- a/examples/travis-ci-test-and-deploy.yml +++ b/examples/travis-ci-test-and-deploy.yml @@ -54,7 +54,7 @@ jobs: - stage: deploy name: Build and deploy Linux wheels services: docker - install: python3 -m pip install cibuildwheel==2.8.1 twine + install: python3 -m pip install cibuildwheel==2.9.0 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl # Deploy on windows @@ -62,7 +62,7 @@ jobs: name: Build and deploy Windows wheels os: windows language: shell - install: python3 -m pip install cibuildwheel==2.8.1 twine + install: python3 -m pip install cibuildwheel==2.9.0 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl diff --git a/setup.cfg b/setup.cfg index 51718be98..06ce771f2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cibuildwheel -version = 2.8.1 +version = 2.9.0 description = Build Python wheels on CI with minimal configuration. long_description = file: README.md long_description_content_type = text/markdown