chore: update CI to Python 3.13#960
Conversation
Bumps python-version pins in build-test-release.yml (pre-commit, test-splunk-matrix, test-cim-models-versions, publish) and docs.yml from Python 3.7/3.8/3.12 to 3.13, and adds a 3.13 classifier to pyproject.toml. Also fixes an invalid escape sequence in a help string (splunk.py) that surfaces as a SyntaxWarning on 3.12+ and would become a SyntaxError in a future Python release. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddbf4d9b39
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "Topic :: Software Development :: Testing", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3.7", | ||
| "Programming Language :: Python :: 3.13", |
There was a problem hiding this comment.
Use a Python 3.13-compatible pytest dependency
With this classifier, Python 3.13 users and the new 3.13 CI jobs that run poetry install are told this package is supported on 3.13, but pyproject.toml still constrains pytest to >5.4.0,<8 and the lock resolves pytest 7.4.4. pytest 7.4.x only advertises support through Python 3.12; Python 3.13 support starts in the 8.x line, so 3.13 installs are stuck on an unsupported test runner. Please update the pytest constraint/lock, likely with version markers if 3.7 support must remain, before advertising 3.13.
Useful? React with 👍 / 👎.
Bump GitHub Actions (checkout, setup-python, upload/download-artifact, create-github-app-token, skywalking-eyes, addonfactory-test-matrix-action, semantic-release-action), the Poetry install pin (1.5.1 -> 2.4.1), and pre-commit hook versions (pre-commit-hooks, black). Reformat with black 26.5.1 accordingly.
setup_commands and selection.new_path_syntax were removed in mkdocstrings-python 2.0.0 (unpinned in docs.yml), causing TypeError: PythonConfig.__init__() got an unexpected keyword argument 'setup_commands' and breaking the docs workflow.
Summary
.github/workflows/build-test-release.yml(pre-commit,test-splunk-matrix,test-cim-models-versions,publish) and.github/workflows/docs.ymlfrom 3.7/3.8/3.12 to 3.13.Programming Language :: Python :: 3.13classifier inpyproject.toml.pytest_splunk_addon/splunk.pythat raisesSyntaxWarning: invalid escape sequence '\p'under Python 3.12+ (would become aSyntaxErrorin future Python releases).actions/checkoutv4→v7,actions/setup-pythonv5→v7,actions/upload-artifactv4→v7,actions/download-artifactv4→v8,actions/create-github-app-tokenv3→v3.2.0,apache/skywalking-eyesv0.6.0→v0.8.0,splunk/addonfactory-test-matrix-actionv3.1.2→v3.3.0,splunk/semantic-release-actionv1.3→v1.3.10.pre-commit/pre-commit-hooksv4.2.0→v6.0.0,psf/black22.8.0→26.5.1.docsworkflow, which started failing independently of this PR's changes:docs.ymlinstallsmkdocstrings-pythonunpinned, and version 2.0.0 (released after this repo's last successful docs run) dropped the legacysetup_commands/selection.new_path_syntaxkeys frommkdocs.yml, causingTypeError: PythonConfig.__init__() got an unexpected keyword argument 'setup_commands'. Removed those obsolete keys (confirmed the API reference pages still render correctly withmkdocs build).Verification
Ran the following directly against a Python 3.13 environment (not just CI):
poetry installresolves and installs cleanly with the existing lockfile (37 packages, no conflicts).pytest_splunk_addonpackage imports cleanly with noSyntaxWarnings after the escape-sequence fix.black --check .passes at 26.5.1.mkdocs buildsucceeds and API reference pages render with content after themkdocs.ymlfix.download-artifactv5's breaking change only affects single-artifact-by-ID downloads, which this workflow doesn't use).docsworkflow now passes on this branch.Test plan
docsworkflow passes with Python 3.13 and the mkdocstrings-python config fixpre-commitjob passes with Python 3.13 and updated hook versions🤖 Generated with Claude Code