Repository navigation
ci: add Python 3.14 to the test matrix - #379
Open
pylaterreur wants to merge 1 commit into
Open
pylaterreur wants to merge 1 commit into
pylaterreur wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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"topython-version.crewaideclaresRequires-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_capturedran its coroutine withasyncio.get_event_loop().run_until_complete(). Since 3.14,get_event_loop()raisesRuntimeError: There is no current event loop in thread 'MainThread'when no loop is set, so useasyncio.run().opentelemetry-instrumentation-google-genaialready has it.AGENTS.md: CI tests 3.10-3.14.requires-pythondoesn'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.yamlon Linux with pip in a fresh venv, as the workflow does:mainOn 3.14,
mainfailstest_tool_definitions_capturedas described above (1 failed, 41 passed, 2 skipped).ruff check .andruff format --check .(0.14.1) pass, and actionlint reports nothing forci-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_newis 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.weaviate-client4.16.2, the version pip picks here, pinsgrpcio<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