Skip to content

Add Python 3.14 support to CI and pre-commit#69089

Open
dwoz wants to merge 16 commits intosaltstack:3006.xfrom
dwoz:cipyversion
Open

Add Python 3.14 support to CI and pre-commit#69089
dwoz wants to merge 16 commits intosaltstack:3006.xfrom
dwoz:cipyversion

Conversation

@dwoz
Copy link
Copy Markdown
Contributor

@dwoz dwoz commented May 8, 2026

  • Update python_version to 3.14 in layout.yml.jinja
  • Add 3.14 to noxfile.py _PYTHON_VERSIONS
  • Create Python 3.14 requirement files for CI and pkg
  • Update pre-commit config with 3.14 hooks
  • Update development setup and troubleshooting docs

- Update python_version to 3.14 in layout.yml.jinja
- Add 3.14 to noxfile.py _PYTHON_VERSIONS
- Create Python 3.14 requirement files for CI and pkg
- Update pre-commit config with 3.14 hooks
- Update development setup and troubleshooting docs
- Add missing Changelog, Tools, and Tools VirusTotal 3.14 pre-commit hooks
- Update towncrier to 24.8.0 to support Python 3.14
- Regenerate requirements
- Update python-tools-scripts to 0.20.5
- Set language_version to python3.10 for all tools hooks to bypass Python 3.14 AST parsing issues
- Remove language_version python3.10 from tools hooks.
- ptscripts 0.20.5 already resolves the Python 3.14 AST issue, and pinning the version causes dependency conflicts during hook execution.
dwoz added 10 commits May 8, 2026 15:30
- Added `isinstance(attr_value, str)` check to satisfy mypy, as `getattr` could return `Any` or `None`.
- Changed the DEFAULT_REQS_CONFIG requirements files from tools.txt to tools.in.
- This prevents pip from attempting to downgrade packages (like urllib3) installed by uv during the initial python-tools-scripts setup, avoiding the OSError caused by uv's non-standard metadata.
…to uv

- Added the required dependencies (boto3, pyyaml, jinja2, MarkupSafe, packaging) directly to the `id: tools` hooks in `.pre-commit-config.yaml` via `additional_dependencies`. This allows `pre-commit` (using `uv`) to natively resolve and install everything required by the tools scripts in one pass.
- Added a `PRE_COMMIT` environment variable check to `tools/__init__.py` to bypass `ptscripts` attempting to run `pip install -r tools.in` when executed inside `pre-commit`.
- This definitively resolves the `OSError` crashes caused by `pip` attempting to downgrade or overwrite packages (like `urllib3` and `six`) that were already installed by `uv` during the hook's initial environment setup.
- Updated lingering hardcoded `3.11` `python-version` inputs to `3.14` in `release.yml`, `depcheck.yml`, `build-docs.yml`, `release-upload-virustotal.yml`, and `ssh-debug.yml`.
- Renamed workflow setup steps from `Set up Python 3.11` to `Set up Python 3.14`.
- Removed `backports` from `_SALT_DEPENDENCIES` for Python 3.13+ to avoid Sphinx treating the mocked missing dependency as a fatal warning during HTML docs build.
- Removed the `upload-release-artifacts` job from `staging.yml.jinja`.
- Regenerated workflows to apply the change to `staging.yml`.
- Updated the description of the `salt-version` input in the `release-upload-virustotal` pipeline to match the simplified one from the staging pipeline.
- Updated the description of the `salt-version` input in the `release.yml`, `release-upload-virustotal.yml` pipelines and the `staging.yml.jinja` template.
- This ensures consistency and matches the detailed formatting instructions (e.g., using the PEP 440 form without a hyphen for prereleases) currently present on the `3008.x` branch.
- Reverted the description of the `salt-version` input in the `release.yml`, `release-upload-virustotal.yml` pipelines and the `staging.yml.jinja` template to the shorter 'Good/Bad' examples format as requested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant