diff --git a/.config/requirements-lock.txt b/.config/requirements-lock.txt index 112e73fb0f..0a68f370c9 100644 --- a/.config/requirements-lock.txt +++ b/.config/requirements-lock.txt @@ -1,11 +1,11 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --no-annotate --output-file=.config/requirements-lock.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml # ansible-compat==4.1.10 -ansible-core==2.15.5 +ansible-core==2.16.0 attrs==23.1.0 black==23.10.1 bracex==2.4 @@ -16,7 +16,6 @@ click==8.1.7 cryptography==41.0.5 filelock==3.13.1 idna==3.4 -importlib-resources==5.0.7 jinja2==3.1.2 jsonschema==4.19.2 jsonschema-specifications==2023.7.1 @@ -33,7 +32,7 @@ pyyaml==6.0.1 referencing==0.30.2 requests==2.31.0 rich==13.6.0 -rpds-py==0.10.6 +rpds-py==0.12.0 ruamel-yaml==0.18.5 subprocess-tee==0.4.1 tomli==2.0.1 diff --git a/.config/requirements.txt b/.config/requirements.txt index ae93334f55..d4ea5b8fa6 100644 --- a/.config/requirements.txt +++ b/.config/requirements.txt @@ -1,11 +1,11 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --extra=docs --extra=test --no-annotate --output-file=.config/requirements.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml # ansible-compat==4.1.10 -ansible-core==2.15.5 +ansible-core==2.16.0 astroid==3.0.1 attrs==23.1.0 babel==2.12.1 @@ -35,7 +35,6 @@ griffe==0.36.4 htmlmin2==0.1.13 idna==3.4 importlib-metadata==6.8.0 -importlib-resources==5.0.7 iniconfig==2.0.0 isort==5.12.0 jinja2==3.1.2 @@ -90,7 +89,7 @@ referencing==0.30.2 regex==2023.8.8 requests==2.31.0 rich==13.6.0 -rpds-py==0.10.6 +rpds-py==0.12.0 ruamel-yaml==0.18.5 six==1.16.0 soupsieve==2.5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f9b2f8a5f..6029dce1e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,10 +32,10 @@ jobs: TOXENV: pkg steps: - - name: Switch to using Python 3.9 by default + - name: Switch to using Python 3.10 by default uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install tox run: python3 -m pip install --user "tox>=4.0.0" diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 9de3e0df2e..a8b7328c5d 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -96,12 +96,12 @@ jobs: ~/.ansible/roles key: ${{ matrix.name || matrix.passed_name }}-${{ hashFiles('tools/test-eco.sh', 'requirements.yml', 'examples/playbooks/collections/requirements.yml') }} - - name: Set up Python ${{ matrix.python_version || '3.9' }} + - name: Set up Python ${{ matrix.python_version || '3.10' }} if: "!contains(matrix.shell, 'wsl')" uses: actions/setup-python@v4 with: cache: pip - python-version: ${{ matrix.python_version || '3.9' }} + python-version: ${{ matrix.python_version || '3.10' }} - uses: actions/setup-node@v4 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34d2eeaeef..23251bae08 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -189,6 +189,7 @@ repos: - rich>=13.2.0 - ruamel-yaml-clib>=0.2.7 - ruamel-yaml>=0.18.2 + - setuptools # needed for pkg_resources import - typing_extensions - wcmatch - yamllint @@ -202,7 +203,7 @@ repos: entry: pip-compile --upgrade --resolver=backtracking -q --no-annotate --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib files: ^.config\/requirements.*$ language: python - language_version: "3.9" # minimal we support officially + language_version: "3.10" # minimal we support officially pass_filenames: false stages: [manual] additional_dependencies: @@ -214,7 +215,7 @@ repos: entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib files: ^.config\/requirements.*$ language: python - language_version: "3.9" # minimal we support officially + language_version: "3.10" # minimal we support officially pass_filenames: false additional_dependencies: - pip>=22.3.1 @@ -226,7 +227,7 @@ repos: files: ^.config\/requirements.*$ alias: up stages: [manual] - language_version: "3.9" # minimal we support officially + language_version: "3.10" # minimal we support officially additional_dependencies: - pip>=22.3.1 - # keep at bottom as these are slower diff --git a/docs/installing.md b/docs/installing.md index 4ed7ab9d17..c194a83e1a 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -27,7 +27,7 @@ automation content. [discussion](https://github.com/ansible/ansible-lint/discussions/2820#discussioncomment-4400380). Pull requests to improve installation instructions are welcome. Any new issues - related to installation will be closed and locked. + related to the installation will be closed and locked. For a container image, we recommend using [creator-ee](https://github.com/ansible/creator-ee/), which includes @@ -50,6 +50,17 @@ current Python environment as an alternative to creating a virtual environment. pip3 install ansible-lint ``` +!!! note + + If you want to install the exact versions of all dependencies that were used + to test a specific version of ansible-lint, you can add `lock` extra. This + will only work with Python 3.10 or newer. Do this only inside a + virtual environment. + + ```bash + pip3 install "ansible-lint[lock]" + ``` + ## Installing on Fedora and RHEL You can install Ansible-lint on Fedora, or Red Hat Enterprise Linux (RHEL) with diff --git a/test/schemas/package-lock.json b/test/schemas/package-lock.json index 6e2bde2bde..01cc36efcc 100644 --- a/test/schemas/package-lock.json +++ b/test/schemas/package-lock.json @@ -15,7 +15,7 @@ "@types/chai": "^4.3.9", "@types/js-yaml": "^4.0.8", "@types/minimatch": "^5.1.2", - "@types/mocha": "^10.0.3", + "@types/mocha": "^10.0.4", "@types/node": "^20.8.10", "chai": "^4.3.10", "minimatch": "^9.0.3", @@ -95,9 +95,9 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", - "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.4.tgz", + "integrity": "sha512-xKU7bUjiFTIttpWaIZ9qvgg+22O1nmbA+HRxdlR+u6TWsGfmFdXrheJoK4fFxrHNVIOBDvDNKZG+LYBpMHpX3w==", "dev": true }, "node_modules/@types/node": { @@ -1409,9 +1409,9 @@ "dev": true }, "@types/mocha": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", - "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.4.tgz", + "integrity": "sha512-xKU7bUjiFTIttpWaIZ9qvgg+22O1nmbA+HRxdlR+u6TWsGfmFdXrheJoK4fFxrHNVIOBDvDNKZG+LYBpMHpX3w==", "dev": true }, "@types/node": { diff --git a/test/schemas/package.json b/test/schemas/package.json index b73bc20a67..7016ed27e5 100644 --- a/test/schemas/package.json +++ b/test/schemas/package.json @@ -15,7 +15,7 @@ "@types/chai": "^4.3.9", "@types/js-yaml": "^4.0.8", "@types/minimatch": "^5.1.2", - "@types/mocha": "^10.0.3", + "@types/mocha": "^10.0.4", "@types/node": "^20.8.10", "chai": "^4.3.10", "minimatch": "^9.0.3", diff --git a/tox.ini b/tox.ini index 0e97ce751b..b75b7e0144 100644 --- a/tox.ini +++ b/tox.ini @@ -66,7 +66,7 @@ setenv = COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} COVERAGE_PROCESS_START={toxinidir}/pyproject.toml PIP_CONSTRAINT = {toxinidir}/.config/requirements.txt - devel,pkg,pre: PIP_CONSTRAINT = /dev/null + devel,pkg,pre,py39: PIP_CONSTRAINT = /dev/null PIP_DISABLE_PIP_VERSION_CHECK = 1 PRE_COMMIT_COLOR = always FORCE_COLOR = 1 @@ -87,7 +87,7 @@ package = editable description = Run all linters # pip compile includes python version in output constraints, so we want to # be sure that version does not change randomly. -basepython = python3.9 +basepython = python3.10 deps = pre-commit>=2.6.0 setuptools>=51.1.1 @@ -117,7 +117,7 @@ description = Bump all test dependencies # we reuse the lint environment envdir = {toxworkdir}/lint skip_install = true -basepython = python3.9 +basepython = python3.10 deps = {[testenv:lint]deps} setenv = @@ -205,7 +205,7 @@ commands = # Validate metadata using twine python3 -m twine check --strict {toxinidir}/dist/* # Install the wheel - sh -c 'python3 -m pip install "ansible-lint[lock] @ file://$(echo {toxinidir}/dist/*.whl)"' + sh -c 'python3 -m pip install "ansible-lint @ file://$(echo {toxinidir}/dist/*.whl)"' # Uninstall it python3 -m pip uninstall -y ansible-lint