From b9e6d4d1582925ef9c25646d8d3832b046a0d564 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 17 Jan 2025 12:18:35 +0000 Subject: [PATCH] Correct minimal requirements - Ensure that our lower requirements can be used - Make uv use constraints like pip (failed to for some time) --- .config/requirements.in | 8 ++++---- .github/lower-constraints.txt | 12 ++++++------ tox.ini | 20 +++++--------------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.config/requirements.in b/.config/requirements.in index 51080603e2..c53c0be039 100644 --- a/.config/requirements.in +++ b/.config/requirements.in @@ -1,17 +1,17 @@ # Special order section for helping pip: will-not-work-on-windows-try-from-wsl-instead; platform_system=='Windows' -ansible-core>=2.13.0 # GPLv3 +ansible-core>=2.14.0 # GPLv3 ansible-compat>=24.10.0 # GPLv3 # alphabetically sorted: black>=24.3.0 # MIT (security) -filelock>=3.3.0 # The Unlicense +filelock>=3.8.2 # The Unlicense importlib-metadata # Apache jsonschema>=4.10.0 # MIT, version needed for improved errors packaging>=21.3 # Apache-2.0,BSD-2-Clause pathspec>=0.10.3 # Mozilla Public License 2.0 (MPL 2.0) -pyyaml>=5.4.1 # MIT (centos 9 has 5.3.1) +pyyaml>=6.0.0 # MIT (compilation probles with older versions) ruamel.yaml>=0.18.5,!=0.18.7,!=0.18.8 # MIT subprocess-tee>=0.4.1 # MIT, used by ansible-compat -yamllint >= 1.30.0 # GPLv3 +yamllint >= 1.34.0 # GPLv3 wcmatch>=8.1.2; python_version < '3.12' # MIT wcmatch>=8.5.0; python_version >= '3.12' # MIT diff --git a/.github/lower-constraints.txt b/.github/lower-constraints.txt index d313869d14..380293c68e 100644 --- a/.github/lower-constraints.txt +++ b/.github/lower-constraints.txt @@ -1,18 +1,18 @@ # This file is kept in a different directory than .config in order to not be # automatically updated by dependabot. This should be kept in sync with # minimal requirements configured inside .config/requirements.in -ansible-core==2.13.0 -ansible-compat==24.5.1 # GPLv3 +ansible-core==2.14.0 +ansible-compat==24.10.0 # GPLv3 black==24.3.0 # MIT (security) -filelock==3.3.0 # The Unlicense +filelock==3.8.2 # The Unlicense jsonschema==4.10.0 # MIT, version needed for improved errors -packaging==21.3 +packaging==22.0 pathspec==0.10.3 -pyyaml==5.4.1 +pyyaml==6.0.2 ruamel.yaml==0.18.5 # MIT subprocess-tee==0.4.1 # MIT, used by ansible-compat # https://packages.ubuntu.com/noble/python3-wcmatch # https://packages.fedoraproject.org/pkgs/python-wcmatch/python3-wcmatch/ wcmatch==8.1.2; python_version < '3.12' # EPEL 8 wcmatch==8.5.0; python_version >= '3.12' -yamllint == 1.30.0 +yamllint == 1.34.0 diff --git a/tox.ini b/tox.ini index 247ec006ea..9b3fc441cb 100644 --- a/tox.ini +++ b/tox.ini @@ -70,7 +70,11 @@ setenv = COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}} COVERAGE_PROCESS_START={toxinidir}/pyproject.toml PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt - devel,pkg,pre,py310: PIP_CONSTRAINT = /dev/null + UV_CONSTRAINT = {toxinidir}/.config/constraints.txt + devel,pkg,pre,py310,lint,hook,deps,schemas: PIP_CONSTRAINT = /dev/null + devel,pkg,pre,py310,lint,hook,deps,schemas: UV_CONSTRAINT = /dev/null + lower: PIP_CONSTRAINT = {toxinidir}/.github/lower-constraints.txt + lower: UV_CONSTRAINT = {toxinidir}/.github/lower-constraints.txt PIP_DISABLE_PIP_VERSION_CHECK = 1 PRE_COMMIT_COLOR = always # Number of expected test passes, safety measure for accidental skip of @@ -108,23 +112,15 @@ commands = passenv = {[testenv]passenv} PRE_COMMIT_HOME -setenv = - {[testenv]setenv} - # avoid messing pre-commit with out own constraints - PIP_CONSTRAINT= [testenv:lower] description = Install using lower-constraints.txt file for testing oldest versions. -setenv = - PIP_CONSTRAINT = {toxinidir}/.github/lower-constraints.txt [testenv:hook] description = Validate pre-commit hook definition deps = pre-commit commands = ./tools/test-hook.sh -setenv = - PIP_CONSTRAINT=/dev/null [testenv:deps] description = Bump all test dependencies @@ -134,9 +130,6 @@ skip_install = true basepython = python3.10 deps = {[testenv:lint]deps} -setenv = - # without his upgrade would likely not do anything - PIP_CONSTRAINT = /dev/null commands_pre = commands = -pre-commit run --all-files --show-diff-on-failure --hook-stage manual lock @@ -178,9 +171,6 @@ commands = description = Rebuild and test JSON Schemas deps = check-jsonschema>=0.26.3 -setenv = - # without this upgrade would likely not do anything - PIP_CONSTRAINT = /dev/null skip_install = true changedir = test/schemas commands_pre =