Skip to content

ci: add Python 3.14 to the test matrix - #379

Open
pylaterreur wants to merge 1 commit into
signalfx:mainfrom
pylaterreur:add-python-3.14
Open

pylaterreur wants to merge 1 commit into
signalfx:mainfrom
pylaterreur:add-python-3.14

Conversation

@pylaterreur

Copy link
Copy Markdown

Summary

Python 3.14 has been out for a year, but CI stops at 3.13 and most packages don't list 3.14 in their classifiers. This adds 3.14 to the CI matrix on all three OSes and the 3.14 classifier to the 18 packages that CI tests.

Changes

  • ci-main.yaml: add "3.14" to python-version. crewai declares Requires-Python <3.14, so pip can't install the CrewAI instrumentation's [instruments,test] extras on 3.14. Its install line moves into its own step, skipped on 3.14 along with its test step; the other install commands keep their order.
  • test_agent_attributes.py (llamaindex): test_tool_definitions_captured ran its coroutine with asyncio.get_event_loop().run_until_complete(). Since 3.14, get_event_loop() raises RuntimeError: There is no current event loop in thread 'MainThread' when no loop is set, so use asyncio.run().
  • The 3.14 classifier for the util packages and the instrumentations CI tests, except CrewAI. opentelemetry-instrumentation-google-genai already has it.
  • AGENTS.md: CI tests 3.10-3.14.

requires-python doesn't change, and this doesn't drop Python 3.10 (end of life since 2026-10-01): several packages here still declare 3.9.

Validation

I ran the steps of ci-main.yaml on Linux with pip in a fresh venv, as the workflow does:

Python Result
3.14.7, this PR every install and test step passes (CrewAI skipped)
3.13.15, main every step passes, CrewAI included
3.10.21, this PR every step passes, CrewAI included

On 3.14, main fails test_tool_definitions_captured as described above (1 failed, 41 passed, 2 skipped).

ruff check . and ruff format --check . (0.14.1) pass, and actionlint reports nothing for ci-main.yaml. I couldn't run the Windows and macOS jobs, but every package version in the 3.14 environment has cp314 (or abi3/pure) wheels on PyPI for Windows amd64 and macOS arm64 too, except httpretty 1.1.4, which is a pure-Python sdist on every version.

Two notes:

  • util/opentelemetry-util-genai/tests/test_handler_singleton.py::TestGetTelemetryHandlerSingleton::test_thread_safe_single_new is flaky on every version: it counts threads that get the singleton before its first __init__ finishes as new instances. In the full util-genai suite it failed in 2 of 10 runs on 3.13 and 3 of 20 on 3.14 here. I left it out of this PR; I can send the fix (count distinct returned objects) separately.
  • Python 3.15 isn't added. The suite passes on 3.15.0 on Linux too, but weaviate-client 4.16.2, the version pip picks here, pins grpcio<1.80, and grpcio 1.78.0 has no cp315 wheels, so pip spends about 15 minutes building it from source, as it does for PyYAML 6.0.3 and zstandard 0.25.0. That is worth revisiting once those have 3.15 wheels.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN

Test on Python 3.14 on Linux, Windows and macOS, and add the Python
3.14 classifier to the packages CI tests. crewai declares
Requires-Python <3.14, so pip cannot install the CrewAI
instrumentation's extras there: install and test it in steps that skip
3.14. The other packages install in the same order as before.

test_tool_definitions_captured ran its coroutine with
asyncio.get_event_loop().run_until_complete(). Since Python 3.14,
get_event_loop() no longer creates a loop when none is set, so the test
failed with "There is no current event loop in thread 'MainThread'".
Use asyncio.run() instead.
@pylaterreur
pylaterreur requested review from a team as code owners October 26, 2026 01:48
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