Skip to content

Commit 4f0bb5a

Browse files
authored
Merge pull request #508 from randomir/add-support-py310
Add Python 3.10 tests
2 parents 6eaae35 + 3a52458 commit 4f0bb5a

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.circleci/config.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,31 @@ jobs:
8585
keys:
8686
- v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-<< parameters.xcode >>
8787

88+
- when:
89+
# backport https://github.com/python/cpython/pull/21113 to support macOS 11 when building py36
90+
# see also: https://github.com/pyenv/pyenv/issues/1737.
91+
condition:
92+
matches:
93+
pattern: "^3\\.6.*$"
94+
value: << parameters.python-version >>
95+
steps:
96+
- run:
97+
name: Install Python 3.6 with a patch for macOS 11
98+
command: |
99+
curl -LO https://github.com/python/cpython/commit/8ea6353.patch
100+
pyenv install << parameters.python-version>> -s -p < 8ea6353.patch
101+
88102
- run: &pyenv-install-python
89103
name: Install python
90104
command: pyenv install << parameters.python-version >> -s
91105

92106
- run: &pyenv-set-system-python
93107
name: Set system python
94108
command: |
95-
pyenv global << parameters.python-version >>
109+
echo -e '\n\n# Initialize pyenv' >> ~/.bash_profile
110+
echo 'eval "$(pyenv init --path 2>/dev/null || true)"' >> ~/.bash_profile
96111
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
112+
pyenv global << parameters.python-version >>
97113
98114
- save_cache: &save-cache-pyenv
99115
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-<< parameters.xcode >>
@@ -161,7 +177,7 @@ jobs:
161177
162178
pypi-deploy:
163179
docker:
164-
- image: circleci/python:3.7
180+
- image: circleci/python:3.9
165181

166182
steps:
167183
- checkout
@@ -191,15 +207,21 @@ workflows:
191207
name: test-linux-py<< matrix.python-version >><<# matrix.dimod-version >>-dimod<< matrix.dimod-version >><</ matrix.dimod-version >>
192208
matrix:
193209
parameters:
194-
python-version: &python-versions ["3.6.12", "3.7.9", "3.8.6", "3.9.0"]
210+
python-version: &python-versions ["3.6.12", "3.7.9", "3.8.6", "3.9.0", "3.10.0"]
195211
dimod-version: ["", "~=0.8.0,>=0.8.21", "~=0.9.0", "~=0.10.0,>0.10.4"]
212+
exclude:
213+
# dimod < 0.10 not supported on py310
214+
- python-version: "3.10.0"
215+
dimod-version: "~=0.8.0,>=0.8.21"
216+
- python-version: "3.10.0"
217+
dimod-version: "~=0.9.0"
196218

197219
- test-macos:
198220
name: test-macos-py<< matrix.python-version >>
199221
matrix:
200222
parameters:
201223
python-version: *python-versions
202-
xcode: ["12.3.0"]
224+
xcode: ["13.2.0"]
203225

204226
- test-docs
205227

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ environment:
44
- PYTHON: "C:\\Python37-x64"
55
- PYTHON: "C:\\Python38-x64"
66
- PYTHON: "C:\\Python39-x64"
7+
- PYTHON: "C:\\Python310-x64"
78

89
install:
910
- "%PYTHON%\\python.exe --version"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
features:
3+
- |
4+
Add Python 3.10 support.

tests/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
mock
21
requests_mock>=1.8
32
coverage
43
codecov

0 commit comments

Comments
 (0)