From 1c810303924dc997579e7b50d35fb009bc1e1e65 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 17 Oct 2023 23:52:30 -0700 Subject: [PATCH 1/2] Lock test-requirements.txt --- .github/workflows/test.yml | 4 +- MANIFEST.in | 1 + test-requirements.in | 19 ++++++++ test-requirements.txt | 99 ++++++++++++++++++++++++++++++++------ 4 files changed, 106 insertions(+), 17 deletions(-) create mode 100644 test-requirements.in diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afa5d5823ea9..86704aca2f91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,7 +133,7 @@ jobs: ./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV source $VENV/bin/activate - name: Install tox - run: pip install --upgrade 'setuptools!=50' tox==4.11.0 + run: pip install setuptools==68.2.2 tox==4.11.0 - name: Compiled with mypyc if: ${{ matrix.test_mypyc }} run: | @@ -185,7 +185,7 @@ jobs: default: 3.11.1 command: python -c "import platform; print(f'{platform.architecture()=} {platform.machine()=}');" - name: Install tox - run: pip install --upgrade 'setuptools!=50' tox==4.11.0 + run: pip install setuptools==68.2.2 tox==4.11.0 - name: Setup tox environment run: tox run -e py --notest - name: Test diff --git a/MANIFEST.in b/MANIFEST.in index a1c15446de3f..3ae340c7bd5e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -31,6 +31,7 @@ graft mypyc/doc # files necessary for testing sdist include mypy-requirements.txt include build-requirements.txt +include test-requirements.in include test-requirements.txt include mypy_self_check.ini prune misc diff --git a/test-requirements.in b/test-requirements.in new file mode 100644 index 000000000000..47c97ae79146 --- /dev/null +++ b/test-requirements.in @@ -0,0 +1,19 @@ +# If you change this file (or mypy-requirements.txt or build-requirements.txt), please run: +# pip-compile --output-file=test-requirements.txt --unsafe-package=typed-ast test-requirements.in + +-r mypy-requirements.txt +-r build-requirements.txt +attrs>=18.0 +black==23.9.1 # must match version in .pre-commit-config.yaml +filelock>=3.3.0 +# lxml 4.9.3 switched to manylinux_2_28, the wheel builder still uses manylinux2014 +lxml>=4.9.1,<4.9.3; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12' +pre-commit +pre-commit-hooks==4.5.0 +psutil>=4.0 +pytest>=7.4.0 +pytest-xdist>=1.34.0 +pytest-cov>=2.10.0 +ruff==0.1.0 # must match version in .pre-commit-config.yaml +setuptools>=65.5.1 +tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.7 diff --git a/test-requirements.txt b/test-requirements.txt index a1fa98917872..311bcc53b8dc 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,16 +1,85 @@ --r mypy-requirements.txt --r build-requirements.txt -attrs>=18.0 -black==23.9.1 # must match version in .pre-commit-config.yaml -filelock>=3.3.0 -# lxml 4.9.3 switched to manylinux_2_28, the wheel builder still uses manylinux2014 -lxml>=4.9.1,<4.9.3; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12' -pre-commit +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --output-file=test-requirements.txt --unsafe-package=typed-ast test-requirements.in +# +attrs==23.1.0 + # via -r test-requirements.in +black==23.9.1 + # via -r test-requirements.in +cfgv==3.4.0 + # via pre-commit +click==8.1.7 + # via black +coverage[toml]==7.3.2 + # via pytest-cov +distlib==0.3.7 + # via virtualenv +execnet==2.0.2 + # via pytest-xdist +filelock==3.12.4 + # via + # -r test-requirements.in + # virtualenv +identify==2.5.30 + # via pre-commit +iniconfig==2.0.0 + # via pytest +lxml==4.9.2 ; (python_version < "3.11" or sys_platform != "win32") and python_version < "3.12" + # via -r test-requirements.in +mypy-extensions==1.0.0 + # via + # -r mypy-requirements.txt + # black +nodeenv==1.8.0 + # via pre-commit +packaging==23.2 + # via + # black + # pytest +pathspec==0.11.2 + # via black +platformdirs==3.11.0 + # via + # black + # virtualenv +pluggy==1.3.0 + # via pytest +pre-commit==3.5.0 + # via -r test-requirements.in pre-commit-hooks==4.5.0 -psutil>=4.0 -pytest>=7.4.0 -pytest-xdist>=1.34.0 -pytest-cov>=2.10.0 -ruff==0.1.0 # must match version in .pre-commit-config.yaml -setuptools>=65.5.1 -tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.7 + # via -r test-requirements.in +psutil==5.9.6 + # via -r test-requirements.in +pytest==7.4.2 + # via + # -r test-requirements.in + # pytest-cov + # pytest-xdist +pytest-cov==4.1.0 + # via -r test-requirements.in +pytest-xdist==3.3.1 + # via -r test-requirements.in +pyyaml==6.0.1 + # via pre-commit +ruamel-yaml==0.17.35 + # via pre-commit-hooks +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml +ruff==0.1.0 + # via -r test-requirements.in +setuptools==68.2.2 + # via + # -r test-requirements.in + # nodeenv +tomli==2.0.1 + # via -r test-requirements.in +types-psutil==5.9.5.17 + # via -r build-requirements.txt +types-setuptools==68.2.0.0 + # via -r build-requirements.txt +typing-extensions==4.8.0 + # via -r mypy-requirements.txt +virtualenv==20.24.5 + # via pre-commit From e6e93c87db1ba6d384f18ee0968ea2320280dcfe Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sat, 21 Oct 2023 00:18:51 -0700 Subject: [PATCH 2/2] change command --- test-requirements.in | 2 +- test-requirements.txt | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/test-requirements.in b/test-requirements.in index 47c97ae79146..bab3ece29c02 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -1,5 +1,5 @@ # If you change this file (or mypy-requirements.txt or build-requirements.txt), please run: -# pip-compile --output-file=test-requirements.txt --unsafe-package=typed-ast test-requirements.in +# pip-compile --output-file=test-requirements.txt --strip-extras --allow-unsafe test-requirements.in -r mypy-requirements.txt -r build-requirements.txt diff --git a/test-requirements.txt b/test-requirements.txt index 311bcc53b8dc..3bb9cf29635f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --output-file=test-requirements.txt --unsafe-package=typed-ast test-requirements.in +# pip-compile --allow-unsafe --output-file=test-requirements.txt --strip-extras test-requirements.in # attrs==23.1.0 # via -r test-requirements.in @@ -12,7 +12,7 @@ cfgv==3.4.0 # via pre-commit click==8.1.7 # via black -coverage[toml]==7.3.2 +coverage==7.3.2 # via pytest-cov distlib==0.3.7 # via virtualenv @@ -63,16 +63,12 @@ pytest-xdist==3.3.1 # via -r test-requirements.in pyyaml==6.0.1 # via pre-commit -ruamel-yaml==0.17.35 +ruamel-yaml==0.17.40 # via pre-commit-hooks ruamel-yaml-clib==0.2.8 # via ruamel-yaml ruff==0.1.0 # via -r test-requirements.in -setuptools==68.2.2 - # via - # -r test-requirements.in - # nodeenv tomli==2.0.1 # via -r test-requirements.in types-psutil==5.9.5.17 @@ -83,3 +79,9 @@ typing-extensions==4.8.0 # via -r mypy-requirements.txt virtualenv==20.24.5 # via pre-commit + +# The following packages are considered to be unsafe in a requirements file: +setuptools==68.2.2 + # via + # -r test-requirements.in + # nodeenv