Skip to content

Commit 4db339c

Browse files
authored
Merge pull request #1175 from mayeut/python-3.7
chore: drop python 3.6 for cibuildwheel driver
2 parents f2c03fa + 6d27f05 commit 4db339c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+323
-232
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22

33
jobs:
4-
osx-python3.6:
4+
osx-python3.9:
55
macos:
66
xcode: 12.5.1
77
environment:
@@ -17,9 +17,9 @@ jobs:
1717
command: venv/bin/python ./bin/run_tests.py
1818
no_output_timeout: 30m
1919

20-
linux-python3.6:
20+
linux-python3.9:
2121
docker:
22-
- image: circleci/python:3.6
22+
- image: circleci/python:3.9
2323
environment:
2424
PYTHON: python3
2525
# Temporarily restrict the tests that are run on CircleCI to prevent
@@ -41,5 +41,5 @@ workflows:
4141
version: 2
4242
all-tests:
4343
jobs:
44-
- osx-python3.6
45-
- linux-python3.6
44+
- osx-python3.9
45+
- linux-python3.9

.pre-commit-config.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ repos:
1717
rev: v2.37.1
1818
hooks:
1919
- id: pyupgrade
20-
name: PyUpgrade 3.6+
21-
args: ["--py36-plus"]
22-
exclude: ^bin/
23-
- id: pyupgrade
24-
name: PyUpgrade 3.7+ on bin
25-
exclude: ^(cibuildwheel|unit_test|test)/
2620
args: ["--py37-plus"]
21+
exclude: ^cibuildwheel/resources/.*py$
2722

2823
# Autoremoves unused imports
2924
- repo: https://github.com/hadialqattan/pycln
@@ -37,6 +32,8 @@ repos:
3732
rev: 5.10.1
3833
hooks:
3934
- id: isort
35+
args: ["-a", "from __future__ import annotations"]
36+
exclude: ^cibuildwheel/resources/.*py$
4037

4138
- repo: https://github.com/psf/black
4239
rev: 22.6.0
@@ -52,9 +49,9 @@ repos:
5249
rev: v0.961
5350
hooks:
5451
- id: mypy
55-
name: mypy 3.6 on cibuildwheel/
56-
exclude: ^(bin|cibuildwheel/resources|docs)/.*py$
57-
args: ["--python-version=3.6"]
52+
name: mypy 3.7 on cibuildwheel/
53+
exclude: ^cibuildwheel/resources/.*py$
54+
args: ["--python-version=3.7"]
5855
additional_dependencies: &mypy-dependencies
5956
- nox
6057
- packaging>=21.0
@@ -70,11 +67,6 @@ repos:
7067
- types-requests
7168
- bracex
7269
- dataclasses
73-
- id: mypy
74-
name: mypy 3.7+ on bin/
75-
files: ^((bin|docs)/.*py)$
76-
args: ["--python-version=3.7"]
77-
additional_dependencies: *mypy-dependencies
7870
- id: mypy
7971
name: mypy 3.10
8072
args: ["--python-version=3.10"]

.travis.yml

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

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

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

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

35-
- name: Windows | x86_64 | Python 3.6
35+
- name: Windows | x86_64 | Python 3.7
3636
os: windows
3737
language: shell
3838
before_install:
39-
- choco upgrade python3 -y --version 3.6.8 --limit-output
39+
- choco upgrade python3 -y --version 3.7.9 --limit-output
4040
# Update root certificates to fix SSL error; see http://www.chawn.com/RootCerts.htm
4141
- 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"
4242
env:
43-
- PYTHON=C:\\Python36\\python
43+
- PYTHON=C:\\Python37\\python
4444

45-
- name: Linux | s390x | Python 3.6
46-
python: 3.6
45+
- name: Linux | s390x | Python 3.7
46+
python: 3.7
4747
services: docker
4848
arch: s390x
4949
env: PYTHON=python

CI.md

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

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

99
> ¹ AppVeyor only runs the "basic" test to reduce load.
1010
11-
Non-x86 architectures are covered on Travis CI using Python 3.6.
11+
Non-x86 architectures are covered on Travis CI using Python 3.7.

azure-pipelines.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ jobs:
2020
python -m pip install -e ".[dev]" pytest-azurepipelines
2121
python ./bin/run_tests.py
2222
23-
- job: windows_36
24-
pool: {vmImage: 'windows-2019'}
25-
timeoutInMinutes: 180
26-
steps:
27-
- task: UsePythonVersion@0
28-
inputs:
29-
versionSpec: '3.6'
30-
- bash: |
31-
python -m pip install -e ".[dev]" pytest-azurepipelines
32-
python ./bin/run_tests.py
33-
3423
- job: windows_38
3524
pool: {vmImage: 'windows-2019'}
3625
timeoutInMinutes: 180

bin/run_tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22

3+
from __future__ import annotations
4+
35
import argparse
46
import os
57
import subprocess

bin/update_dependencies.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
2-
# This file supports 3.6+
2+
3+
from __future__ import annotations
34

45
import os
56
import shutil

bin/update_readme_changelog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22

3+
from __future__ import annotations
4+
35
import re
46
import sys
57
from pathlib import Path

cibuildwheel/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
from __future__ import annotations
2+
13
__version__ = "2.8.1"

cibuildwheel/__main__.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import argparse
24
import os
35
import shutil
@@ -7,7 +9,6 @@
79
import textwrap
810
from pathlib import Path
911
from tempfile import mkdtemp
10-
from typing import List, Set, Union
1112

1213
import cibuildwheel
1314
import cibuildwheel.linux
@@ -257,7 +258,7 @@ def build_in_directory(args: CommandLineArguments) -> None:
257258
log.warning(f"Can't delete temporary folder '{str(tmp_path)}'")
258259

259260

260-
def print_preamble(platform: str, options: Options, identifiers: List[str]) -> None:
261+
def print_preamble(platform: str, options: Options, identifiers: list[str]) -> None:
261262
print(
262263
textwrap.dedent(
263264
"""
@@ -287,13 +288,13 @@ def print_preamble(platform: str, options: Options, identifiers: List[str]) -> N
287288

288289

289290
def get_build_identifiers(
290-
platform: PlatformName, build_selector: BuildSelector, architectures: Set[Architecture]
291-
) -> List[str]:
292-
python_configurations: Union[
293-
List[cibuildwheel.linux.PythonConfiguration],
294-
List[cibuildwheel.windows.PythonConfiguration],
295-
List[cibuildwheel.macos.PythonConfiguration],
296-
]
291+
platform: PlatformName, build_selector: BuildSelector, architectures: set[Architecture]
292+
) -> list[str]:
293+
python_configurations: (
294+
list[cibuildwheel.linux.PythonConfiguration]
295+
| list[cibuildwheel.windows.PythonConfiguration]
296+
| list[cibuildwheel.macos.PythonConfiguration]
297+
)
297298

298299
if platform == "linux":
299300
python_configurations = cibuildwheel.linux.get_python_configurations(
@@ -313,7 +314,7 @@ def get_build_identifiers(
313314
return [config.identifier for config in python_configurations]
314315

315316

316-
def detect_warnings(*, options: Options, identifiers: List[str]) -> List[str]:
317+
def detect_warnings(*, options: Options, identifiers: list[str]) -> list[str]:
317318
warnings = []
318319

319320
# warn about deprecated {python} and {pip}

0 commit comments

Comments
 (0)