diff --git a/Dockerfile b/Dockerfile index 06030bcd..e29b4bf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,9 @@ RUN apk --no-cache add \ yamllint # Install Yamale YAML schema validator +# Note: Yamale 6.0.0 supports Python 3.8+, including Python 3.13. +# Python 3.14 compatibility requires Yamale >= 7.0.0 (when available). +# For Python 3.14 runners, ensure Yamale is updated to a version with Python 3.14 support. ARG yamale_version=6.0.0 LABEL yamale-version=$yamale_version RUN pip install --break-system-packages "yamale==$yamale_version" diff --git a/README.md b/README.md index 2209b29e..7a26bc7d 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,21 @@ available tags [here](https://quay.io/repository/helmpack/chart-testing?tab=tags $ brew install chart-testing ``` +## Python Version Compatibility + +Chart Testing (`ct`) bundles Yamale for YAML schema validation. The currently bundled Yamale version (6.0.0) supports Python 3.8 through Python 3.13. + +**Python 3.14 Note**: If you are using CT on a system with Python 3.14 installed, schema validation may fail due to Yamale's use of deprecated Python AST features that were removed in Python 3.14. + +**For detailed information and solutions, see [PYTHON-3.14-COMPATIBILITY.md](PYTHON-3.14-COMPATIBILITY.md)** + +**Quick Workaround**: When Python 3.14 is detected on your system: +1. **Use the Docker image** (recommended): `docker run quay.io/helmpack/chart-testing:latest ct lint` +2. **Use Python 3.13 or earlier** on your system or CI/CD pipeline +3. **Disable schema validation** temporarily: `ct lint --validate-chart-schema=false` (not recommended) + +Future versions of CT will include updated Yamale versions with Python 3.14 support. + ## Usage See documentation for individual commands: @@ -184,6 +199,17 @@ Build ct using Goreleaser. If this flag is not specified, Goreleaser is run with --snapshot ``` +## Troubleshooting + +### Schema Validation Fails with Python 3.14 + +If you encounter `AttributeError: module 'ast' has no attribute 'Num'` or similar errors during schema validation when running CT on a system with Python 3.14, this is a known compatibility issue. + +Quick solutions: +- Use the Docker image: `docker run quay.io/helmpack/chart-testing ct lint` +- Use Python 3.13 or earlier +- Upgrade to a future CT release with Python 3.14 support + ## Releasing ### Prepare Release