Skip to content

Commit 0b0830f

Browse files
Merge pull request #265 from YannickJadoul/drop-2.7
Dropping Python 2.7 host support
2 parents 67022e6 + 165e51a commit 0b0830f

File tree

16 files changed

+72
-112
lines changed

16 files changed

+72
-112
lines changed

.circleci/config.yml

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

33
jobs:
4-
osx-python2:
4+
osx-python3.6:
55
macos:
6-
xcode: "10.0.0"
6+
xcode: "9.4.1"
77
environment:
8-
PYTHON: python2
8+
PYTHON: python3
99
steps:
1010
- checkout
1111

@@ -16,7 +16,7 @@ jobs:
1616
name: Test.
1717
command: venv/bin/python ./bin/run_tests.py
1818

19-
osx-python3:
19+
osx-python3.7:
2020
macos:
2121
xcode: "10.0.0"
2222
environment:
@@ -31,23 +31,7 @@ jobs:
3131
name: Test.
3232
command: venv/bin/python ./bin/run_tests.py
3333

34-
linux-python2:
35-
docker:
36-
- image: circleci/python:2.7
37-
environment:
38-
PYTHON: python2
39-
steps:
40-
- checkout
41-
- setup_remote_docker
42-
43-
- run:
44-
name: Prepare the environment.
45-
command: bash .circleci/prepare.sh
46-
- run:
47-
name: Test.
48-
command: venv/bin/python ./bin/run_tests.py
49-
50-
linux-python3:
34+
linux-python3.6:
5135
docker:
5236
- image: circleci/python:3.6
5337
environment:
@@ -67,7 +51,6 @@ workflows:
6751
version: 2
6852
all-tests:
6953
jobs:
70-
- osx-python2
71-
- osx-python3
72-
- linux-python2
73-
- linux-python3
54+
- osx-python3.6
55+
- osx-python3.7
56+
- linux-python3.6

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ language: generic
22

33
matrix:
44
include:
5-
# Linux Python 2
6-
- sudo: required
7-
language: python
8-
python: 2.7
9-
services: docker
10-
env: PYTHON=python
11-
125
# Linux Python 3
136
- sudo: required
147
language: python

CI.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This is a summary of the Python versions and platforms covered by the different CI platforms:
2+
3+
| | 3.5 | 3.6 | 3.7 | 3.8 |
4+
|----------|------------------|------------------|-----------------------|------------------|
5+
| Linux | Travis CI | CircleCI | AppVeyor | Azure Pipelines |
6+
| macOS | Azure Pipelines | CircleCI | Travis CI¹ / CircleCI | Azure Pipelines |
7+
| Windows | TravisCI | Azure Pipelines | AppVeyor | Azure Pipelines |
8+
9+
> ¹ Python version not really pinned, but dependent on the (default) version of image used.

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ image:
33
- Visual Studio 2015
44

55
build_script:
6-
- cmd: "C:\\Python27\\python.exe -m pip install -r requirements-dev.txt"
6+
- cmd: "C:\\Python37\\python.exe -m pip install -r requirements-dev.txt"
77
- sh: "${HOME}/.localpython3.7.4/bin/python3 -m pip install -r requirements-dev.txt"
88
# the '-u' flag is required so the output is in the correct order.
99
# See https://github.com/joerick/cibuildwheel/pull/24 for more info.
10-
- cmd: "C:\\Python27\\python.exe -u ./bin/run_tests.py"
10+
- cmd: "C:\\Python37\\python.exe -u ./bin/run_tests.py"
1111
- sh: "${HOME}/.localpython3.7.4/bin/python3 ./bin/run_tests.py"

azure-pipelines.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jobs:
2-
- job: linux
2+
- job: linux_38
33
pool: {vmImage: 'Ubuntu-18.04'}
44
steps:
55
- task: UsePythonVersion@0
@@ -9,7 +9,17 @@ jobs:
99
python -m pip install -r requirements-dev.txt
1010
python ./bin/run_tests.py
1111
12-
- job: macos
12+
- job: macos_35
13+
pool: {vmImage: 'macOS-10.13'}
14+
steps:
15+
- task: UsePythonVersion@0
16+
inputs:
17+
versionSpec: '3.5'
18+
- bash: |
19+
python -m pip install -r requirements-dev.txt
20+
python ./bin/run_tests.py
21+
22+
- job: macos_38
1323
pool: {vmImage: 'macOS-10.13'}
1424
steps:
1525
- task: UsePythonVersion@0
@@ -19,7 +29,19 @@ jobs:
1929
python -m pip install -r requirements-dev.txt
2030
python ./bin/run_tests.py
2131
22-
- job: windows
32+
- job: windows_36
33+
pool: {vmImage: 'vs2017-win2016'}
34+
steps:
35+
- task: UsePythonVersion@0
36+
inputs:
37+
versionSpec: '3.6'
38+
- script: choco install vcpython27 -f -y
39+
displayName: Install Visual C++ for Python 2.7
40+
- bash: |
41+
python -m pip install -r requirements-dev.txt
42+
python ./bin/run_tests.py
43+
44+
- job: windows_38
2345
pool: {vmImage: 'vs2017-win2016'}
2446
steps:
2547
- task: UsePythonVersion@0

bin/run_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3-
from __future__ import print_function
43
import os, sys, subprocess, shutil
54

65

bin/run_tests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3-
from __future__ import print_function
43
import os, sys, subprocess, shutil, json
54
from glob import glob
65

cibuildwheel/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
import argparse, os, subprocess, sys, textwrap
32

43
import cibuildwheel

cibuildwheel/bashlex_eval.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,8 @@ def evaluate_word_node(node, context):
6060
def evaluate_command_node(node, context):
6161
words = [evaluate_node(part, context=context) for part in node.parts]
6262
command = ' '.join(words)
63-
output = subprocess.check_output(shlex.split(command), env=context.environment)
63+
return subprocess.check_output(shlex.split(command), env=context.environment, universal_newlines=True)
6464

65-
if sys.version_info[0] >= 3:
66-
return output.decode('utf8', 'replace')
67-
else:
68-
return output
6965

7066
def evaluate_parameter_node(node, context):
7167
return context.environment.get(node.value, '')

cibuildwheel/environment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def split_env_items(env_string):
4141
return result
4242

4343

44-
class EnvironmentAssignment(object):
44+
class EnvironmentAssignment:
4545
def __init__(self, assignment):
4646
name, equals, value = assignment.partition('=')
4747
if not equals:
@@ -60,7 +60,7 @@ def __repr__(self):
6060
return '%s=%s' % (self.name, self.value)
6161

6262

63-
class ParsedEnvironment(object):
63+
class ParsedEnvironment:
6464
def __init__(self, assignments):
6565
self.assignments = assignments
6666

0 commit comments

Comments
 (0)