Skip to content

Commit fceb9ea

Browse files
committed
Add Python 3.11 and PyPy 3.9 to the testing
1 parent ae9d626 commit fceb9ea

File tree

6 files changed

+64
-57
lines changed

6 files changed

+64
-57
lines changed

.github/workflows/test.yml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
python-version: ["pypy-3.7", "3.9"]
9+
python-version: ["pypy-3.8", "3.11"]
1010
target: [
1111
"src-layout",
1212
"adhoc-layout",
1313
]
1414
include:
1515
# Add new helper variables to existing jobs
16-
- {python-version: "pypy-3.7", tox-python-version: "pypy3"}
17-
- {python-version: "3.9", tox-python-version: "py39"}
16+
- {python-version: "pypy-3.9", tox-python-version: "pypy3"}
17+
- {python-version: "3.11", tox-python-version: "py311"}
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020

2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v4
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525

2626
- name: Cache
27-
uses: actions/cache@v2
27+
uses: actions/cache@v3
2828
with:
2929
path: ~/.cache/pip
3030
key:
@@ -34,8 +34,8 @@ jobs:
3434
3535
- name: Install dependencies
3636
run: |
37-
python -m pip install -U pip
38-
python -m pip install -U wheel
37+
python -m pip install --upgrade pip
38+
python -m pip install --upgrade wheel
3939
python -m pip install --progress-bar=off tox -rci/requirements.txt
4040
4141
- name: Examples
@@ -51,33 +51,15 @@ jobs:
5151
matrix:
5252
include:
5353
- name: 'check'
54-
python: '3.9'
55-
toxpython: 'python3.9'
54+
python: '3.11'
55+
toxpython: 'python3.11'
5656
tox_env: 'check'
5757
os: 'ubuntu-latest'
5858
- name: 'docs'
59-
python: '3.9'
60-
toxpython: 'python3.9'
59+
python: '3.11'
60+
toxpython: 'python3.11'
6161
tox_env: 'docs'
6262
os: 'ubuntu-latest'
63-
- name: 'py36-pytest70-xdist250-coverage62 (ubuntu)'
64-
python: '3.6'
65-
toxpython: 'python3.6'
66-
python_arch: 'x64'
67-
tox_env: 'py36-pytest70-xdist250-coverage62'
68-
os: 'ubuntu-latest'
69-
- name: 'py36-pytest70-xdist250-coverage62 (windows)'
70-
python: '3.6'
71-
toxpython: 'python3.6'
72-
python_arch: 'x64'
73-
tox_env: 'py36-pytest70-xdist250-coverage62'
74-
os: 'windows-latest'
75-
- name: 'py36-pytest70-xdist250-coverage62 (macos)'
76-
python: '3.6'
77-
toxpython: 'python3.6'
78-
python_arch: 'x64'
79-
tox_env: 'py36-pytest70-xdist250-coverage62'
80-
os: 'macos-latest'
8163
- name: 'py37-pytest71-xdist250-coverage64 (ubuntu)'
8264
python: '3.7'
8365
toxpython: 'python3.7'
@@ -150,23 +132,23 @@ jobs:
150132
python_arch: 'x64'
151133
tox_env: 'py310-pytest71-xdist250-coverage64'
152134
os: 'macos-latest'
153-
- name: 'pypy37-pytest71-xdist250-coverage64 (ubuntu)'
154-
python: 'pypy-3.7'
155-
toxpython: 'pypy3.7'
135+
- name: 'py311-pytest72-xdist320-coverage65 (ubuntu)'
136+
python: '3.11'
137+
toxpython: 'python3.11'
156138
python_arch: 'x64'
157-
tox_env: 'pypy37-pytest71-xdist250-coverage64'
139+
tox_env: 'py311-pytest72-xdist320-coverage65'
158140
os: 'ubuntu-latest'
159-
- name: 'pypy37-pytest71-xdist250-coverage64 (windows)'
160-
python: 'pypy-3.7'
161-
toxpython: 'pypy3.7'
141+
- name: 'py311-pytest72-xdist320-coverage65 (windows)'
142+
python: '3.11'
143+
toxpython: 'python3.11'
162144
python_arch: 'x64'
163-
tox_env: 'pypy37-pytest71-xdist250-coverage64'
145+
tox_env: 'py311-pytest72-xdist320-coverage65'
164146
os: 'windows-latest'
165-
- name: 'pypy37-pytest71-xdist250-coverage64 (macos)'
166-
python: 'pypy-3.7'
167-
toxpython: 'pypy3.7'
147+
- name: 'py311-pytest72-xdist320-coverage65 (macos)'
148+
python: '3.11'
149+
toxpython: 'python3.11'
168150
python_arch: 'x64'
169-
tox_env: 'pypy37-pytest71-xdist250-coverage64'
151+
tox_env: 'py311-pytest72-xdist320-coverage65'
170152
os: 'macos-latest'
171153
- name: 'pypy38-pytest71-xdist250-coverage64 (ubuntu)'
172154
python: 'pypy-3.8'
@@ -186,17 +168,35 @@ jobs:
186168
python_arch: 'x64'
187169
tox_env: 'pypy38-pytest71-xdist250-coverage64'
188170
os: 'macos-latest'
171+
- name: 'pypy39--pytest72-xdist320-coverage65 (ubuntu)'
172+
python: 'pypy-3.9'
173+
toxpython: 'pypy3.9'
174+
python_arch: 'x64'
175+
tox_env: 'pypy39-pytest72-xdist320-coverage65'
176+
os: 'ubuntu-latest'
177+
- name: 'pypy39-pytest72-xdist320-coverage65 (windows)'
178+
python: 'pypy-3.9'
179+
toxpython: 'pypy3.9'
180+
python_arch: 'x64'
181+
tox_env: 'pypy39-pytest72-xdist320-coverage65'
182+
os: 'windows-latest'
183+
- name: 'pypy39-pytest72-xdist320-coverage65 (macos)'
184+
python: 'pypy-3.9'
185+
toxpython: 'pypy3.9'
186+
python_arch: 'x64'
187+
tox_env: 'pypy39-pytest72-xdist320-coverage65'
188+
os: 'macos-latest'
189189
steps:
190-
- uses: actions/checkout@v2
190+
- uses: actions/checkout@v3
191191
with:
192192
fetch-depth: 0
193-
- uses: actions/setup-python@v2
193+
- uses: actions/setup-python@v4
194194
with:
195195
python-version: ${{ matrix.python }}
196196
architecture: ${{ matrix.python_arch }}
197197
- name: install dependencies
198198
run: |
199-
python -mpip install --progress-bar=off -r ci/requirements.txt
199+
python -m pip install --progress-bar=off -r ci/requirements.txt
200200
virtualenv --version
201201
pip --version
202202
tox --version

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
# pre-commit autoupdate
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.3.0
7+
rev: v4.4.0
88
hooks:
99
- id: trailing-whitespace
1010
- id: end-of-file-fixer
1111
exclude: '.*\.pth$'
1212
- id: debug-statements
1313
- repo: https://github.com/PyCQA/isort
14-
rev: 5.10.1
14+
rev: 5.12.0
1515
hooks:
1616
- id: isort
1717
- repo: https://github.com/asottile/pyupgrade
18-
rev: v3.2.2
18+
rev: v3.3.1
1919
hooks:
2020
- id: pyupgrade
21-
args: [--py36-plus]
21+
args: [--py37-plus]
2222
- repo: https://github.com/PyCQA/flake8
23-
rev: 5.0.4
23+
rev: 6.0.0
2424
hooks:
2525
- id: flake8

ci/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def main():
6565
# This uses sys.executable the same way that the call in
6666
# cookiecutter-pylibrary/hooks/post_gen_project.py
6767
# invokes this bootstrap.py itself.
68-
for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True).splitlines()
68+
for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], text=True).splitlines()
6969
]
7070
tox_environments = [line for line in tox_environments if line.startswith('py')]
7171

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ def run(self):
111111
'Programming Language :: Python',
112112
'Programming Language :: Python :: 3',
113113
'Programming Language :: Python :: 3 :: Only',
114-
'Programming Language :: Python :: 3.6',
115114
'Programming Language :: Python :: 3.7',
116115
'Programming Language :: Python :: 3.8',
117116
'Programming Language :: Python :: 3.9',
118117
'Programming Language :: Python :: 3.10',
118+
'Programming Language :: Python :: 3.11',
119119
'Programming Language :: Python :: Implementation :: CPython',
120120
'Programming Language :: Python :: Implementation :: PyPy',
121121
'Topic :: Software Development :: Testing',
@@ -133,7 +133,7 @@ def run(self):
133133
'pytest>=4.6',
134134
'coverage[toml]>=5.2.1'
135135
],
136-
python_requires='>=3.6',
136+
python_requires='>=3.7',
137137
extras_require={
138138
'testing': [
139139
'fields',

tests/test_pytest_cov.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,8 @@ def test_foo():
15561556
SCRIPT_SIMPLE_RESULT = '4 * 100%'
15571557

15581558

1559+
@pytest.mark.skipif('tuple(int(x) for x in xdist.__version__.split(".")) >= (2, 5, 0)',
1560+
reason="--boxed option was removed in version 2.5.0")
15591561
@pytest.mark.skipif('sys.platform == "win32"')
15601562
def test_dist_boxed(testdir):
15611563
script = testdir.makepyfile(SCRIPT_SIMPLE)
@@ -1916,6 +1918,7 @@ def find_labels(text, pattern):
19161918

19171919

19181920
@pytest.mark.skipif("coverage.version_info < (5, 0)")
1921+
@pytest.mark.skipif("coverage.version_info > (6, 4)")
19191922
@xdist_params
19201923
def test_contexts(pytester, testdir, opts):
19211924
with open(os.path.join(os.path.dirname(__file__), "contextful.py")) as f:

tox.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ passenv =
1212
[tox]
1313
envlist =
1414
check
15-
py{36}-pytest{70}-xdist250-coverage{62}
1615
py{37,38,39,310,py37,py38}-pytest{71}-xdist250-coverage{64}
16+
py{311,py39}-pytest{72}-xdist320-coverage{65}
1717
docs
1818

1919
[testenv]
@@ -30,6 +30,7 @@ setenv =
3030
pytest62: _DEP_PYTEST=pytest==6.2.5
3131
pytest70: _DEP_PYTEST=pytest==7.0.1
3232
pytest71: _DEP_PYTEST=pytest==7.1.2
33+
pytest72: _DEP_PYTEST=pytest==7.2.0
3334

3435
xdist127: _DEP_PYTESTXDIST=pytest-xdist==1.27.0
3536
xdist129: _DEP_PYTESTXDIST=pytest-xdist==1.29.0
@@ -41,6 +42,7 @@ setenv =
4142
xdist201: _DEP_PYTESTXDIST=pytest-xdist==2.1.0
4243
xdist202: _DEP_PYTESTXDIST=pytest-xdist==2.2.0
4344
xdist250: _DEP_PYTESTXDIST=pytest-xdist==2.5.0
45+
xdist320: _DEP_PYTESTXDIST=pytest-xdist==3.2.0
4446
xdistdev: _DEP_PYTESTXDIST=git+https://github.com/pytest-dev/pytest-xdist.git#egg=pytest-xdist
4547

4648
coverage45: _DEP_COVERAGE=coverage==4.5.4
@@ -55,6 +57,7 @@ setenv =
5557
coverage62: _DEP_COVERAGE=coverage==6.2
5658
coverage63: _DEP_COVERAGE=coverage==6.3.3
5759
coverage64: _DEP_COVERAGE=coverage==6.4.2
60+
coverage65: _DEP_COVERAGE=coverage==6.5.0
5861
# For testing against a coverage.py working tree.
5962
coveragedev: _DEP_COVERAGE=-e{env:COVERAGE_HOME}
6063
passenv =
@@ -87,12 +90,13 @@ commands =
8790

8891
[testenv:check]
8992
deps =
90-
docutils
9193
check-manifest
94+
colorama
95+
docutils
9296
flake8
93-
readme-renderer
94-
pygments
9597
isort
98+
pygments
99+
readme-renderer
96100
skip_install = true
97101
usedevelop = false
98102
commands =

0 commit comments

Comments
 (0)