Skip to content

Commit 67112ca

Browse files
authored
Merge pull request #44 from pytest-dev/relax-dependencies/1/dev
Relax dependencies
2 parents fae08fe + 4b1d9ac commit 67112ca

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ jobs:
1717
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
1818
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11.0-beta - 3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
1919
extra: ['', '-smtp']
20+
# The forced pytest versions correspond with the lower bounds in tox.ini
21+
pytest-version: ['', '--force-dep pytest==4', '--force-dep pytest==6.2.4']
22+
exclude:
23+
- python-version: '3.5'
24+
pytest-version: '--force-dep pytest==6.2.4'
25+
- python-version: '3.10'
26+
pytest-version: '--force-dep pytest==4'
27+
- python-version: '3.11.0-beta - 3.11'
28+
pytest-version: '--force-dep pytest==4'
2029
fail-fast: false
2130

2231
steps:
@@ -30,4 +39,4 @@ jobs:
3039
python -m pip install --upgrade pip
3140
pip install tox
3241
- name: Test with tox
33-
run: tox -vv -e py${{ matrix.extra }}
42+
run: tox -vv -e py${{ matrix.extra }} ${{ matrix.pytest-version }}

tox.ini

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@ downloadcache = {toxworkdir}/_download
99
[testenv]
1010
description = run test suite under {basepython}
1111
deps =
12-
pytest >=4, <7; python_version<'3.10'
13-
pytest >=6.2.5, <7; python_version>='3.10'
14-
# pytest-cov >=2, <3
12+
# Future major versions of pytest may break backwards compatibility in a way
13+
# that prevents them from working with this package, so we prevent testing
14+
# with major versions that haven't been released yet. Each time a new major
15+
# version of pytest is released, once it's confirmed to work with this
16+
# package, we should bump this limit to the next major version.
17+
#
18+
# The lower bounds come from testing with different pytest versions using
19+
# tox's --force-dep option to find the earliest versions of pytest that are
20+
# known to work. If you add code that breaks with an old version of pytest,
21+
# feel free to raise these bounds to represent the earliest version that
22+
# works with your code. Don't forget to modify the corresponding entries in
23+
# the Github workflows configuration file if you do change these lower
24+
# bounds.
25+
pytest >=4, <8; python_version<'3.10'
26+
pytest >=6.2.4, <8; python_version>='3.10'
1527
pytest-cov
1628
six
1729
requests

0 commit comments

Comments
 (0)