Skip to content

Commit ff8cebb

Browse files
authored
Lock test dependencies (#16283)
This was discussed in the contributor meetup today. This is a simple solution that requires very few changes. If you want to upgrade the lock file, you can pass `--upgrade` or just delete it and regenerate.
1 parent eecbcb9 commit ff8cebb

File tree

4 files changed

+108
-17
lines changed

4 files changed

+108
-17
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV
134134
source $VENV/bin/activate
135135
- name: Install tox
136-
run: pip install --upgrade 'setuptools!=50' tox==4.11.0
136+
run: pip install setuptools==68.2.2 tox==4.11.0
137137
- name: Compiled with mypyc
138138
if: ${{ matrix.test_mypyc }}
139139
run: |
@@ -185,7 +185,7 @@ jobs:
185185
default: 3.11.1
186186
command: python -c "import platform; print(f'{platform.architecture()=} {platform.machine()=}');"
187187
- name: Install tox
188-
run: pip install --upgrade 'setuptools!=50' tox==4.11.0
188+
run: pip install setuptools==68.2.2 tox==4.11.0
189189
- name: Setup tox environment
190190
run: tox run -e py --notest
191191
- name: Test

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ graft mypyc/doc
3131
# files necessary for testing sdist
3232
include mypy-requirements.txt
3333
include build-requirements.txt
34+
include test-requirements.in
3435
include test-requirements.txt
3536
include mypy_self_check.ini
3637
prune misc

test-requirements.in

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# If you change this file (or mypy-requirements.txt or build-requirements.txt), please run:
2+
# pip-compile --output-file=test-requirements.txt --strip-extras --allow-unsafe test-requirements.in
3+
4+
-r mypy-requirements.txt
5+
-r build-requirements.txt
6+
attrs>=18.0
7+
black==23.9.1 # must match version in .pre-commit-config.yaml
8+
filelock>=3.3.0
9+
# lxml 4.9.3 switched to manylinux_2_28, the wheel builder still uses manylinux2014
10+
lxml>=4.9.1,<4.9.3; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12'
11+
pre-commit
12+
pre-commit-hooks==4.5.0
13+
psutil>=4.0
14+
pytest>=7.4.0
15+
pytest-xdist>=1.34.0
16+
pytest-cov>=2.10.0
17+
ruff==0.1.0 # must match version in .pre-commit-config.yaml
18+
setuptools>=65.5.1
19+
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.7

test-requirements.txt

+86-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,87 @@
1-
-r mypy-requirements.txt
2-
-r build-requirements.txt
3-
attrs>=18.0
4-
black==23.9.1 # must match version in .pre-commit-config.yaml
5-
filelock>=3.3.0
6-
# lxml 4.9.3 switched to manylinux_2_28, the wheel builder still uses manylinux2014
7-
lxml>=4.9.1,<4.9.3; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12'
8-
pre-commit
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --output-file=test-requirements.txt --strip-extras test-requirements.in
6+
#
7+
attrs==23.1.0
8+
# via -r test-requirements.in
9+
black==23.9.1
10+
# via -r test-requirements.in
11+
cfgv==3.4.0
12+
# via pre-commit
13+
click==8.1.7
14+
# via black
15+
coverage==7.3.2
16+
# via pytest-cov
17+
distlib==0.3.7
18+
# via virtualenv
19+
execnet==2.0.2
20+
# via pytest-xdist
21+
filelock==3.12.4
22+
# via
23+
# -r test-requirements.in
24+
# virtualenv
25+
identify==2.5.30
26+
# via pre-commit
27+
iniconfig==2.0.0
28+
# via pytest
29+
lxml==4.9.2 ; (python_version < "3.11" or sys_platform != "win32") and python_version < "3.12"
30+
# via -r test-requirements.in
31+
mypy-extensions==1.0.0
32+
# via
33+
# -r mypy-requirements.txt
34+
# black
35+
nodeenv==1.8.0
36+
# via pre-commit
37+
packaging==23.2
38+
# via
39+
# black
40+
# pytest
41+
pathspec==0.11.2
42+
# via black
43+
platformdirs==3.11.0
44+
# via
45+
# black
46+
# virtualenv
47+
pluggy==1.3.0
48+
# via pytest
49+
pre-commit==3.5.0
50+
# via -r test-requirements.in
951
pre-commit-hooks==4.5.0
10-
psutil>=4.0
11-
pytest>=7.4.0
12-
pytest-xdist>=1.34.0
13-
pytest-cov>=2.10.0
14-
ruff==0.1.0 # must match version in .pre-commit-config.yaml
15-
setuptools>=65.5.1
16-
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.7
52+
# via -r test-requirements.in
53+
psutil==5.9.6
54+
# via -r test-requirements.in
55+
pytest==7.4.2
56+
# via
57+
# -r test-requirements.in
58+
# pytest-cov
59+
# pytest-xdist
60+
pytest-cov==4.1.0
61+
# via -r test-requirements.in
62+
pytest-xdist==3.3.1
63+
# via -r test-requirements.in
64+
pyyaml==6.0.1
65+
# via pre-commit
66+
ruamel-yaml==0.17.40
67+
# via pre-commit-hooks
68+
ruamel-yaml-clib==0.2.8
69+
# via ruamel-yaml
70+
ruff==0.1.0
71+
# via -r test-requirements.in
72+
tomli==2.0.1
73+
# via -r test-requirements.in
74+
types-psutil==5.9.5.17
75+
# via -r build-requirements.txt
76+
types-setuptools==68.2.0.0
77+
# via -r build-requirements.txt
78+
typing-extensions==4.8.0
79+
# via -r mypy-requirements.txt
80+
virtualenv==20.24.5
81+
# via pre-commit
82+
83+
# The following packages are considered to be unsafe in a requirements file:
84+
setuptools==68.2.2
85+
# via
86+
# -r test-requirements.in
87+
# nodeenv

0 commit comments

Comments
 (0)