diff --git a/.config/lock-requirements.txt b/.config/lock-requirements.txt index 620f482967..ffeb99ec12 100644 --- a/.config/lock-requirements.txt +++ b/.config/lock-requirements.txt @@ -17,8 +17,8 @@ cryptography==41.0.5 filelock==3.13.1 idna==3.4 jinja2==3.1.2 -jsonschema==4.19.2 -jsonschema-specifications==2023.7.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.11.2 markdown-it-py==3.0.0 markupsafe==2.1.3 mdurl==0.1.2 @@ -29,7 +29,7 @@ platformdirs==3.11.0 pycparser==2.21 pygments==2.16.1 pyyaml==6.0.1 -referencing==0.30.2 +referencing==0.31.1 requests==2.31.0 rich==13.6.0 rpds-py==0.12.0 diff --git a/.config/requirements.txt b/.config/requirements.txt index d4ea5b8fa6..4a138de284 100644 --- a/.config/requirements.txt +++ b/.config/requirements.txt @@ -40,9 +40,9 @@ isort==5.12.0 jinja2==3.1.2 jmespath==1.0.1 jsmin==3.0.1 -jsonschema==4.19.2 -jsonschema-specifications==2023.7.1 -license-expression==30.1.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.11.2 +license-expression==30.2.0 markdown==3.4.4 markdown-exec==1.6.0 markdown-include==0.8.1 @@ -85,7 +85,7 @@ python-dateutil==2.8.2 python-slugify==8.0.1 pyyaml==6.0.1 pyyaml-env-tag==0.1 -referencing==0.30.2 +referencing==0.31.1 regex==2023.8.8 requests==2.31.0 rich==13.6.0 @@ -98,7 +98,7 @@ text-unidecode==1.3 tinycss2==1.2.1 tomli==2.0.1 tomlkit==0.12.2 -types-jsonschema==4.19.0.4 +types-jsonschema==4.20.0.0 types-pyyaml==6.0.12.12 typing-extensions==4.8.0 urllib3==2.0.5 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 851f74753e..58baf09928 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -160,7 +160,7 @@ repos: - ruamel-yaml>=0.18.2 - subprocess-tee - types-PyYAML - - types-jsonschema>=4.4.2 + - types-jsonschema>=4.20.0.0 - types-pkg_resources - types-setuptools - wcmatch @@ -181,7 +181,7 @@ repos: - black>=22.10.0 - docutils - filelock>=3.12.2 - - jsonschema>=4.9.0 + - jsonschema>=4.20.0 - license-expression >= 30.1.1 - pytest-mock - pytest>=7.2.2 @@ -200,7 +200,7 @@ repos: name: lock alias: lock always_run: true - entry: pip-compile --upgrade --resolver=backtracking -q --no-annotate --output-file=.config/lock-requirements.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib + entry: pip-compile --upgrade -q --no-annotate --output-file=.config/lock-requirements.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib files: ^.config\/.*requirements.*$ language: python language_version: "3.10" # minimal we support officially @@ -212,7 +212,7 @@ repos: name: deps alias: deps always_run: true - 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 + entry: pip-compile -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.10" # minimal we support officially @@ -220,7 +220,7 @@ repos: additional_dependencies: - pip>=22.3.1 - id: pip-compile - 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 --upgrade + entry: pip-compile -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib --upgrade language: python always_run: true pass_filenames: false diff --git a/src/ansiblelint/schemas/galaxy.json b/src/ansiblelint/schemas/galaxy.json index 8af66d4ed2..a509ed4c03 100644 --- a/src/ansiblelint/schemas/galaxy.json +++ b/src/ansiblelint/schemas/galaxy.json @@ -36,10 +36,13 @@ "APSL-1.1", "APSL-1.2", "APSL-2.0", + "ASWF-Digital-Assets-1.0", + "ASWF-Digital-Assets-1.1", "Abstyles", "AdaCore-doc", "Adobe-2006", "Adobe-Glyph", + "Adobe-Utopia", "Afmparse", "Aladdin", "Apache-1.0", @@ -51,9 +54,12 @@ "Artistic-1.0-Perl", "Artistic-1.0-cl8", "Artistic-2.0", + "Asterisk-exception", "Autoconf-exception-2.0", "Autoconf-exception-3.0", "Autoconf-exception-generic", + "Autoconf-exception-generic-3.0", + "Autoconf-exception-macro", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Patent", @@ -61,6 +67,7 @@ "BSD-3-Clause", "BSD-3-Clause-Attribution", "BSD-3-Clause-Clear", + "BSD-3-Clause-HP", "BSD-3-Clause-LBNL", "BSD-3-Clause-Modification", "BSD-3-Clause-No-Military-License", @@ -68,6 +75,8 @@ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-No-Nuclear-Warranty", "BSD-3-Clause-Open-MPI", + "BSD-3-Clause-Sun", + "BSD-3-Clause-flex", "BSD-4-Clause", "BSD-4-Clause-Shortened", "BSD-4-Clause-UC", @@ -75,8 +84,10 @@ "BSD-4.3TAHOE", "BSD-Advertising-Acknowledgement", "BSD-Attribution-HPND-disclaimer", + "BSD-Inferno-Nettverk", "BSD-Protection", "BSD-Source-Code", + "BSD-Systemics", "BSL-1.0", "BUSL-1.1", "Baekmuk", @@ -89,6 +100,7 @@ "Bitstream-Charter", "Bitstream-Vera", "BlueOak-1.0.0", + "Boehm-GC", "Bootloader-exception", "Borceux", "Brian-Gladman-3-Clause", @@ -144,6 +156,7 @@ "CC-BY-SA-3.0", "CC-BY-SA-3.0-AT", "CC-BY-SA-3.0-DE", + "CC-BY-SA-3.0-IGO", "CC-BY-SA-4.0", "CC-PDDC", "CC0-1.0", @@ -182,11 +195,13 @@ "Community-Spec-1.0", "Condor-1.1", "Cornell-Lossless-JPEG", + "Cronyx", "Crossword", "CrystalStacker", "Cube", "D-FSL-1.0", "DL-DE-BY-2.0", + "DL-DE-ZERO-2.0", "DOC", "DRL-1.0", "DSDP", @@ -207,6 +222,7 @@ "Entessa", "ErlPL-1.1", "Eurosym", + "FBM", "FDK-AAC", "FLTK-exception", "FSFAP", @@ -216,11 +232,14 @@ "FTL", "Fair", "Fawkes-Runtime-exception", + "Ferguson-Twofish", "Font-exception-2.0", "Frameworx-1.0", "FreeBSD-DOC", "FreeImage", + "Furuseth", "GCC-exception-2.0", + "GCC-exception-2.0-note", "GCC-exception-3.1", "GD", "GFDL-1.1-invariants-only", @@ -244,10 +263,12 @@ "GL2PS", "GLWTPL", "GNAT-exception", + "GNU-compiler-exception", "GPL-1.0-only", "GPL-1.0-or-later", "GPL-2.0-only", "GPL-2.0-or-later", + "GPL-3.0-interface-exception", "GPL-3.0-linking-exception", "GPL-3.0-linking-source-exception", "GPL-3.0-only", @@ -260,9 +281,17 @@ "Glulxe", "Graphics-Gems", "HP-1986", + "HP-1989", "HPND", + "HPND-DEC", "HPND-Markus-Kuhn", + "HPND-Pbmplus", + "HPND-UC", + "HPND-doc", + "HPND-doc-sell", "HPND-export-US", + "HPND-export-US-modify", + "HPND-sell-regexpr", "HPND-sell-variant", "HPND-sell-variant-MIT-disclaimer", "HTMLTIDY", @@ -279,6 +308,7 @@ "ImageMagick", "Imlib2", "Info-ZIP", + "Inner-Net-2.0", "Intel", "Intel-ACPI", "Interbase-1.0", @@ -287,6 +317,7 @@ "JSON", "Jam", "JasPer-2.0", + "Kastrup", "Kazlib", "KiCad-libraries-exception", "Knuth-CTAN", @@ -300,6 +331,7 @@ "LGPL-3.0-only", "LGPL-3.0-or-later", "LGPLLR", + "LLGPL", "LLVM-exception", "LOOP", "LPL-1.0", @@ -313,6 +345,7 @@ "LZMA-SDK-9.22", "LZMA-exception", "Latex2e", + "Latex2e-translated-notice", "Leptonica", "LiLiQ-P-1.1", "LiLiQ-R-1.1", @@ -320,18 +353,26 @@ "Libpng", "Libtool-exception", "Linux-OpenIB", + "Linux-man-pages-1-para", "Linux-man-pages-copyleft", + "Linux-man-pages-copyleft-2-para", + "Linux-man-pages-copyleft-var", "Linux-syscall-note", + "Lucida-Bitmap-Fonts", "MIT", "MIT-0", "MIT-CMU", + "MIT-Festival", "MIT-Modern-Variant", "MIT-Wu", "MIT-advertising", "MIT-enna", "MIT-feh", "MIT-open-group", + "MIT-testregex", "MITNFA", + "MMIXware", + "MPEG-SSG", "MPL-1.0", "MPL-1.1", "MPL-2.0", @@ -342,6 +383,7 @@ "MTLL", "MakeIndex", "Martin-Birgmeier", + "McPhee-slideshow", "Minpack", "MirOS", "Motosoto", @@ -358,6 +400,7 @@ "NICTA-1.0", "NIST-PD", "NIST-PD-fallback", + "NIST-Software", "NLOD-1.0", "NLOD-2.0", "NLPL", @@ -411,8 +454,10 @@ "OLDAP-2.6", "OLDAP-2.7", "OLDAP-2.8", + "OLFL-1.3", "OML", "OPL-1.0", + "OPL-UK-3.0", "OPUBL-1.0", "OSET-PL-2.1", "OSL-1.0", @@ -423,6 +468,7 @@ "OpenJDK-assembly-exception-1.0", "OpenPBS-2.3", "OpenSSL", + "PADL", "PDDL-1.0", "PHP-3.0", "PHP-3.01", @@ -451,17 +497,21 @@ "RSCPL", "Rdisc", "Ruby", + "SANE-exception", "SAX-PD", "SCEA", "SGI-B-1.0", "SGI-B-1.1", "SGI-B-2.0", + "SGI-OpenGL", + "SGP4", "SHL-0.5", "SHL-0.51", "SHL-2.0", "SHL-2.1", "SISSL", "SISSL-1.2", + "SL", "SMLNJ", "SMPPL", "SNIA", @@ -477,6 +527,7 @@ "Sendmail-8.23", "SimPL-2.0", "Sleepycat", + "Soundex", "Spencer-86", "Spencer-94", "Spencer-99", @@ -493,15 +544,21 @@ "TPDL", "TPL-1.0", "TTWL", + "TTYP0", "TU-Berlin-1.0", "TU-Berlin-2.0", + "TermReadKey", + "Texinfo-exception", + "UBDL-exception", "UCAR", "UCL-1.0", "UPL-1.0", + "URT-RLE", "Unicode-DFS-2015", "Unicode-DFS-2016", "Unicode-TOU", "Universal-FOSS-exception-1.0", + "UnixCrypt", "Unlicense", "VOSTROM", "VSL-1.0", @@ -511,13 +568,16 @@ "W3C-20150513", "WTFPL", "Watcom-1.0", + "Widget-Workshop", "Wsuipa", "WxWindows-exception-3.1", "X11", "X11-distribute-modifications-variant", "XFree86-1.1", "XSkat", + "Xdebug-1.03", "Xerox", + "Xfig", "Xnet", "YPL-1.0", "YPL-1.1", @@ -525,40 +585,56 @@ "ZPL-2.0", "ZPL-2.1", "Zed", + "Zeeff", "Zend-2.0", "Zimbra-1.3", "Zimbra-1.4", "Zlib", "blessing", "bzip2-1.0.6", + "check-cvs", "checkmk", "copyleft-next-0.3.0", "copyleft-next-0.3.1", + "cryptsetup-OpenSSL-exception", "curl", "diffmark", + "dtoa", "dvipdfm", "eCos-exception-2.0", "eGenix", "etalab-2.0", "freertos-exception-2.0", + "fwlw", "gSOAP-1.3b", "gnu-javamail-exception", "gnuplot", "i2p-gpl-java-exception", "iMatix", "libpng-2.0", + "libpri-OpenH323-exception", "libselinux-1.0", "libtiff", "libutil-David-Nugent", + "lsof", + "magaz", + "metamail", "mif-exception", "mpi-permissive", "mpich2", "mplus", "openvpn-openssl-exception", + "pnmstitc", "psfrag", "psutils", + "python-ldap", "snprintf", + "ssh-keyscan", + "stunnel-exception", + "swrule", "u-boot-exception-2.0", + "ulem", + "vsftpd-openssl-exception", "w3m", "x11vnc-openssl-exception", "xinetd", diff --git a/test/test_schemas.py b/test/test_schemas.py index a76826c774..cfa3bd17be 100644 --- a/test/test_schemas.py +++ b/test/test_schemas.py @@ -1,9 +1,11 @@ """Test schemas modules.""" import json import logging +import os import subprocess import sys import urllib +import warnings from pathlib import Path from typing import Any from unittest.mock import DEFAULT, MagicMock, patch @@ -89,9 +91,17 @@ def test_spdx() -> None: schema = json.load(f) spx_enum = schema["$defs"]["SPDXLicenseEnum"]["enum"] if set(spx_enum) != license_ids: - with galaxy_json.open("w", encoding="utf-8") as f: - schema["$defs"]["SPDXLicenseEnum"]["enum"] = sorted(license_ids) - json.dump(schema, f, indent=2) - pytest.fail( - "SPDX license list inside galaxy.json JSON Schema file was updated.", - ) + # In absence of a + if os.environ.get("PIP_CONSTRAINT", "/dev/null") != "/dev/null": + with galaxy_json.open("w", encoding="utf-8") as f: + schema["$defs"]["SPDXLicenseEnum"]["enum"] = sorted(license_ids) + json.dump(schema, f, indent=2) + pytest.fail( + "SPDX license list inside galaxy.json JSON Schema file was updated.", + ) + else: + warnings.warn( + "test_spdx failure was ignored because constraints were not pinned (PIP_CONSTRAINTS). This is expected for py39 and py-devel jobs.", + category=pytest.PytestWarning, + stacklevel=1, + )