Skip to content

Test on Python 3.12-3.15, with 3.15 as the primary version - #22

Merged
maroux merged 6 commits into
mainfrom
ci-python-3.12-3.15
Nov 12, 2026
Merged

maroux merged 6 commits into
mainfrom
ci-python-3.12-3.15

Conversation

@maroux

@maroux maroux commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Runs CI on Python 3.12, 3.13, 3.14 and 3.15, and makes 3.15 the primary version.

Changes

  • Matrices: Pytest, Python Syntax and pip-compile run 3.12–3.15. The isolated backend, validator and OpenTelemetry jobs, the release job, and the Dockerfile, docker-compose and Makefile defaults use 3.15.
  • Requirements: adds requirements/dev-3.14.txt and dev-3.15.txt, compiled with scripts/pip-compile.sh in the python:3.14/python:3.15 images, and removes the 3.9–3.11 files. black is pinned to 25.1.0 in dev.in (matching the Python Syntax workflow) so a black upgrade, and the reformatting it brings, can land separately.
  • OpenTelemetry 0.17b0 jobs: OpenTelemetry 0.17b0 imports pkg_resources, which setuptools 81 removed, so on 3.12+ these jobs were skipping the instrumentation tests. scripts/test-setup.sh installs setuptools<81 for pre-1.0 versions. GCP tests still skip under 0.17b0, since current google-cloud-pubsub needs a newer OpenTelemetry.
  • Codecov: the project check allows a 0.5% drop. On 3.12+ coverage never marks the GoogleMetadata field docstrings as run, which costs about 0.25% now that 3.9–3.11 no longer upload.
  • Package metadata: python_requires is >=3.12, the classifiers list 3.12–3.15, and the README and docs say 3.12+.
  • Tests and docs on current dependencies:
    • The publish trace tests expected traceparent flags 01. Current OpenTelemetry also sets the random-trace-id flag (03), so they now use the span's own flags.
    • The Redis visibility-extension test required the message to be idle for under 500 ms when checked. The dependency set for 3.14+ includes rich (via coveralls → typer), which makes the error log after the extension take about a second. The test now measures idle time from the extension, so it still fails if the extension is a no-op.
    • pytest 9 (in the 3.14/3.15 requirements) makes importorskip skip only on ModuleNotFoundError. In the no-OpenTelemetry job, google-cloud-pubsub (which now imports opentelemetry) and the leftover opentelemetry namespace raise a plain ImportError, so the optional-dependency importorskip calls pass exc_type=ImportError, matching pytest 8.
    • The docs build sets SETTINGS_MODULE=tests.settings, which newer sphinx-autodoc-typehints imports. scripts/make-docs.sh now puts the repo root on PYTHONPATH.

Verification

make test docs in Docker on 3.12, 3.14 and 3.15 (mypy, pytest including Redis, black, flake8, Sphinx) passes, as does make test for every 3.15 isolated job (each backend, OpenTelemetry off, 0.17b0 and 1.30.0).

🤖 Generated with Claude Code

maroux and others added 3 commits November 11, 2026 16:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Expect the span's own trace flags in traceparent; OpenTelemetry now
  sets the random-trace-id flag (03).
- Measure the Redis visibility-extension idle time from the extension,
  since rich tracebacks can make the error log after it slow.
- Put the repo root on PYTHONPATH for the docs build so tests.settings
  imports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.83%. Comparing base (60b6769) to head (e6a6c53).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   97.07%   96.83%   -0.25%     
==========================================
  Files          27       27              
  Lines        1643     1643              
==========================================
- Hits         1595     1591       -4     
- Misses         48       52       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

maroux and others added 3 commits November 11, 2026 17:58
pytest 9's importorskip only skips on ModuleNotFoundError. With
OpenTelemetry uninstalled, google-cloud-pubsub and the leftover
opentelemetry namespace raise a plain ImportError instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenTelemetry 0.17b0 imports pkg_resources, so the 0.17b0 jobs were silently skipping the instrumentation tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maroux
maroux marked this pull request as ready for review November 12, 2026 03:02
@maroux
maroux merged commit ccc6eb5 into main Nov 12, 2026
4 of 13 checks passed
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