Skip to content

chore: update CI to Python 3.13#960

Open
mkolasinski-splunk wants to merge 3 commits into
mainfrom
chore/ci-python-3.13
Open

chore: update CI to Python 3.13#960
mkolasinski-splunk wants to merge 3 commits into
mainfrom
chore/ci-python-3.13

Conversation

@mkolasinski-splunk

@mkolasinski-splunk mkolasinski-splunk commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bumps Python version pins in .github/workflows/build-test-release.yml (pre-commit, test-splunk-matrix, test-cim-models-versions, publish) and .github/workflows/docs.yml from 3.7/3.8/3.12 to 3.13.
  • Adds a Programming Language :: Python :: 3.13 classifier in pyproject.toml.
  • Fixes an unescaped backslash in a help string in pytest_splunk_addon/splunk.py that raises SyntaxWarning: invalid escape sequence '\p' under Python 3.12+ (would become a SyntaxError in future Python releases).
  • Updates CI dependencies:
    • GitHub Actions: actions/checkout v4→v7, actions/setup-python v5→v7, actions/upload-artifact v4→v7, actions/download-artifact v4→v8, actions/create-github-app-token v3→v3.2.0, apache/skywalking-eyes v0.6.0→v0.8.0, splunk/addonfactory-test-matrix-action v3.1.2→v3.3.0, splunk/semantic-release-action v1.3→v1.3.10.
    • Poetry install pin: 1.5.1 → 2.4.1.
    • Pre-commit hooks: pre-commit/pre-commit-hooks v4.2.0→v6.0.0, psf/black 22.8.0→26.5.1.
    • Reformatted the codebase with black 26.5.1 (mostly a blank line added after module docstrings); no behavioral changes.
  • Fixes the docs workflow, which started failing independently of this PR's changes: docs.yml installs mkdocstrings-python unpinned, and version 2.0.0 (released after this repo's last successful docs run) dropped the legacy setup_commands/selection.new_path_syntax keys from mkdocs.yml, causing TypeError: PythonConfig.__init__() got an unexpected keyword argument 'setup_commands'. Removed those obsolete keys (confirmed the API reference pages still render correctly with mkdocs build).

Verification

Ran the following directly against a Python 3.13 environment (not just CI):

  • poetry install resolves and installs cleanly with the existing lockfile (37 packages, no conflicts).
  • Full unit test suite: 525 passed (re-verified after the black 26.5.1 reformat).
  • pytest_splunk_addon package imports cleanly with no SyntaxWarnings after the escape-sequence fix.
  • black --check . passes at 26.5.1.
  • e2e test collection succeeds with no collection errors.
  • mkdocs build succeeds and API reference pages render with content after the mkdocs.yml fix.
  • Checked GitHub Releases changelogs for each bumped action for breaking changes relevant to this repo's usage; none apply (e.g. download-artifact v5's breaking change only affects single-artifact-by-ID downloads, which this workflow doesn't use).
  • Confirmed on CI: docs workflow now passes on this branch.

Test plan

  • docs workflow passes with Python 3.13 and the mkdocstrings-python config fix
  • CI passes on this PR across the Splunk version matrix and CIM models matrix with Python 3.13
  • pre-commit job passes with Python 3.13 and updated hook versions

🤖 Generated with Claude Code

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>
@mkolasinski-splunk
mkolasinski-splunk requested a review from a team as a code owner July 20, 2026 06:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread pyproject.toml
"Topic :: Software Development :: Testing",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.13",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant