Skip to content

Commit 5629253

Browse files
authored
Pin runtime and test dependencies (#316)
* build: Extracted runtime dependencies finto requirements.txt. Signed-off-by: Michael Seifert <[email protected]> * build: Removed upper version bound on pytest dependency. Constrained pytest to v7.1.1. Signed-off-by: Michael Seifert <[email protected]> * build: Added version constraints for transitive dependencies of the "testing" extra. Signed-off-by: Michael Seifert <[email protected]> * build: Added version constraints for dependencies to the "pytest-min" tox environment. Signed-off-by: Michael Seifert <[email protected]> * build: Extracted runtime dependencies from pytest-min tox environment into the file pytest-min-requirements.txt. Signed-off-by: Michael Seifert <[email protected]> * build: Added missing explicit dependency on typing-extensions to pytest-min-requirements. Signed-off-by: Michael Seifert <[email protected]> * ci: Move different sets of constraint and requirement files to different directories. This allows Dependabot to update both dependency sets independently. Signed-off-by: Michael Seifert <[email protected]> * build: Removed upper bound on the mypy version installed by the "testing" extra. Adjusted constraints accordingly. Signed-off-by: Michael Seifert <[email protected]> * build: Removed upper bound on the coverage version installed by the "testing" extra. Adjusted constraints accordingly. Signed-off-by: Michael Seifert <[email protected]>
1 parent 957ff44 commit 5629253

File tree

7 files changed

+69
-6
lines changed

7 files changed

+69
-6
lines changed

.github/dependabot.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
version: 2
33
updates:
44
- package-ecosystem: pip
5-
directory: /
5+
directory: /dependencies/default
66
schedule:
7-
interval: daily
7+
interval: weekly
8+
open-pull-requests-limit: 10
9+
target-branch: master
10+
- package-ecosystem: pip
11+
directory: /dependencies/pytest-min
12+
schedule:
13+
interval: weekly
814
open-pull-requests-limit: 10
915
target-branch: master
1016
- package-ecosystem: github-actions

dependencies/default/constraints.txt

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
async-generator==1.10
2+
attrs==21.4.0
3+
coverage==6.3.2
4+
flaky==3.7.0
5+
hypothesis==6.39.6
6+
idna==3.3
7+
importlib-metadata==4.11.3
8+
iniconfig==1.1.1
9+
mypy==0.942
10+
mypy-extensions==0.4.3
11+
outcome==1.1.0
12+
packaging==21.3
13+
pluggy==1.0.0
14+
py==1.11.0
15+
pyparsing==3.0.7
16+
pytest==7.1.1
17+
pytest-trio==0.7.0
18+
sniffio==1.2.0
19+
sortedcontainers==2.4.0
20+
tomli==2.0.1
21+
trio==0.20.0
22+
typed-ast==1.5.2
23+
typing_extensions==4.1.1
24+
zipp==3.7.0

dependencies/default/requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Always adjust install_requires in setup.cfg and pytest-min-requirements.txt
2+
# when changing runtime dependencies
3+
pytest >= 6.1.0
4+
typing-extensions >= 3.7.2; python_version < "3.8"
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
async-generator==1.10
2+
attrs==21.4.0
3+
coverage==6.3.2
4+
flaky==3.7.0
5+
hypothesis==6.39.6
6+
idna==3.3
7+
iniconfig==1.1.1
8+
mypy==0.942
9+
mypy-extensions==0.4.3
10+
outcome==1.1.0
11+
packaging==21.3
12+
pluggy==0.13.1
13+
py==1.11.0
14+
pyparsing==3.0.7
15+
pytest==6.1.0
16+
pytest-trio==0.7.0
17+
sniffio==1.2.0
18+
sortedcontainers==2.4.0
19+
toml==0.10.2
20+
tomli==2.0.1
21+
trio==0.20.0
22+
typing_extensions==4.1.1
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Always adjust install_requires in setup.cfg and requirements.txt
2+
# when changing minimum version dependencies
3+
pytest == 6.1.0
4+
typing-extensions >= 3.7.2; python_version < "3.8"

setup.cfg

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ python_requires = >=3.7
3434
packages = find:
3535
include_package_data = True
3636

37+
# Always adjust requirements.txt and pytest-min-requirements.txt when changing runtime dependencies
3738
install_requires =
3839
pytest >= 6.1.0
3940
typing-extensions >= 3.7.2; python_version < "3.8"
4041

4142
[options.extras_require]
4243
testing =
43-
coverage==6.2
44+
coverage >= 6.2
4445
hypothesis >= 5.7.1
4546
flaky >= 3.5.0
46-
mypy == 0.931
47+
mypy >= 0.931
4748
pytest-trio >= 0.7.0
4849

4950
[options.entry_points]

tox.ini

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ passenv =
88
[testenv]
99
extras = testing
1010
deps =
11-
pytest == 6.2.5 # required for Python 3.10, not bad for others
11+
--requirement dependencies/default/requirements.txt
12+
--constraint dependencies/default/constraints.txt
1213
commands = make test
1314
allowlist_externals =
1415
make
1516

1617
[testenv:pytest-min]
1718
extras = testing
1819
deps =
19-
pytest == 6.1.0
20+
--requirement dependencies/pytest-min/requirements.txt
21+
--constraint dependencies/pytest-min/constraints.txt
2022
commands = make test
2123
allowlist_externals =
2224
make

0 commit comments

Comments
 (0)