Repository navigation
Drop Python 3.10 and add Python 3.15 support - #992
Conversation
Every package now requires Python 3.11+. The -oldest envs move to 3.11 and the -latest envs to 3.11 and 3.15. CrewAI stays on 3.14 because it caps pydantic below 2.13, which has no 3.15 wheels. The openai test pydantic pin only existed for PyPy 3.10 and blocked 3.15, so it moves to 2.14.1 along with its Renovate rule.
Ruff picks up the new requires-python, so typing_extensions.Self becomes typing.Self, timezone.utc becomes UTC, and a 3.10-only branch in a langchain test helper goes away.
Pull request dashboard statusMerged · refreshed 2026-10-28 18:02 UTC Status above doesn't look right?
|
There was a problem hiding this comment.
🟢 Approval recommended
The compatibility changes align with the intended Python support policy and documented exceptions, with no identified blocking issues.
No open issues 🎉
What changed in this PR
Raises the monorepo’s minimum Python version to 3.11 and adds Python 3.15 coverage, addressing #973’s dependency-maintenance concerns after Python 3.10 reaches end of life.
Changes:
- Updates package and example metadata, retaining documented compatibility exceptions.
- Moves oldest test environments to 3.11 and most latest environments to 3.11/3.15 without increasing the matrix size.
- Removes obsolete compatibility branches and dependency constraints, and aligns contributor guidance.
| File | Description |
|---|---|
util/opentelemetry-util-genai/tests/test_utils.py |
Uses standard-library datetime.UTC. |
util/opentelemetry-util-genai/src/opentelemetry/util/genai/_invocation.py |
Imports Self from typing. |
util/opentelemetry-util-genai/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
util/opentelemetry-test-util-genai/pyproject.toml |
Raises test utilities’ minimum to 3.11. |
tox.ini |
Updates interpreter coverage while retaining compatibility exceptions. |
pyproject.toml |
Raises workspace and type-checking baselines to 3.11. |
instrumentation/opentelemetry-instrumentation-google-genai/pyproject.toml |
Updates Python metadata and local type-checking baseline. |
instrumentation/opentelemetry-instrumentation-genai-weaviate-client/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-smolagents/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-qwenpaw/pyproject.toml |
Drops 3.10 support, retaining the existing upper classifier. |
instrumentation/opentelemetry-instrumentation-genai-qwen-agent/tests/requirements.latest.txt |
Updates the comment explaining unpinned NumPy. |
instrumentation/opentelemetry-instrumentation-genai-qwen-agent/pyproject.toml |
Drops 3.10 support without adding newer classifiers. |
instrumentation/opentelemetry-instrumentation-genai-portkey/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-openai/tests/test_response_extractors.py |
Uses datetime.UTC in test data. |
instrumentation/opentelemetry-instrumentation-genai-openai/tests/requirements.v2.txt |
Updates Pydantic for Python 3.15 compatibility. |
instrumentation/opentelemetry-instrumentation-genai-openai/tests/requirements.v1.txt |
Updates Pydantic for Python 3.15 compatibility. |
instrumentation/opentelemetry-instrumentation-genai-openai/tests/requirements.oldest.txt |
Removes the Python 3.10 NumPy pin. |
instrumentation/opentelemetry-instrumentation-genai-openai/tests/requirements.latest.txt |
Updates Pydantic and removes conditional HTTPX2 pins. |
instrumentation/opentelemetry-instrumentation-genai-openai/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-openai-agents/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-llama-index/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/test_operation_mapping.py |
Imports standard-library Self. |
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/test_execution_context.py |
Removes Python 3.10 cancellation handling from assertions. |
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/test_agent_classification_corpus.py |
Imports standard-library Self. |
instrumentation/opentelemetry-instrumentation-genai-langchain/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-langchain/examples/zero-code/pyproject.toml |
Raises the example minimum to 3.11. |
instrumentation/opentelemetry-instrumentation-genai-langchain/examples/manual/uv.lock |
Removes Python 3.10 resolution branches and artifacts. |
instrumentation/opentelemetry-instrumentation-genai-langchain/examples/manual/pyproject.toml |
Raises the example minimum to 3.11. |
instrumentation/opentelemetry-instrumentation-genai-dspy/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-crewai/pyproject.toml |
Drops 3.10 support without declaring 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/pyproject.toml |
Drops 3.10 support without adding newer classifiers. |
instrumentation/opentelemetry-instrumentation-genai-bedrock/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml |
Requires 3.11+ and declares 3.15 support. |
examples/suppress-inference-event/manual/pyproject.toml |
Raises the example minimum to 3.11. |
examples/suppress-inference-event/declarative/pyproject.toml |
Raises the example minimum to 3.11. |
AGENTS.md |
Updates documented test-matrix templates. |
.github/renovate.json5 |
Removes the obsolete Pydantic update restriction. |
.github/instructions/build-config.instructions.md |
Aligns matrix review guidance with the new versions. |
Review effort: Balanced
There was a problem hiding this comment.
This can be removed.. ruffs up rule misses some stuff.
Other things that can be removed:
scripts/check_deps.py (lines 42–45):
diff
-try:
- import tomllib
-except ModuleNotFoundError: # Python < 3.11 - import tomli as tomllib
+import tomllib
scripts/version_utils.py (lines 14–17):
diff
-try:
- import tomllib
-except ModuleNotFoundError: - import tomli as tomllib
+import tomllib
-
Dead sys.version_info < (3, 11) Test Skip Markers in langchain
-
Stale pypy-3.10 Mapping and Comments
scripts/tox_matrix.py (lines 25, 30–31):
_PY_FACTOR_VERSION: dict[str, str] = {"pypy3": "pypy-3.10"} is dead code pointing to Python 3.10
- random stuff
enum.StrEnum (Python 3.11+): Modality(str, Enum) (which manually defines def str(self) -> str: return self.value to work around Python 3.11's str(Enum) format change) and Role(str, Enum) in util/opentelemetry-util-genai/src/opentelemetry/util/genai/types.py (lines 162, 332) can use enum.StrEnum (verify against tox -e check-util-api / griffe first in case base-class change is flagged).
Branch Protection Rules: if repository branch protection rules list specific 3.10 or 3.14 matrix job names as required status checks, they will need to be updated to the 3.11 / 3.15 job names (not sure if we do this)
There was a problem hiding this comment.
Done in b769550, and merged main. I left StrEnum out because check-util-api flags it; happy to do it in a separate PR.
| ; instrumentation-genai-crewai | ||
| py3{10,14}-test-instrumentation-genai-crewai-latest | ||
| py310-test-instrumentation-genai-crewai-oldest | ||
| ; crewai caps pydantic below 2.13, which has no Python 3.15 wheels. |
There was a problem hiding this comment.
nit: crewai also pulls in onnxruntime (via chromadb), which has no cp315 wheels yet (microsoft/onnxruntime#33359). Naming both blockers makes it easier to tell when 3.15 can be enabled.
| ; crewai caps pydantic below 2.13, which has no Python 3.15 wheels. | |
| ; crewai caps pydantic below 2.13 and pulls in onnxruntime (via chromadb); neither has Python 3.15 wheels. |
…5-v2 # Conflicts: # util/opentelemetry-util-genai/src/opentelemetry/util/genai/_invocation.py
|
Merged main and applied the tox.ini suggestions. Could someone approve the workflow run? |
Description
Fixes #973
All packages now require Python 3.11+. I removed the 3.10 classifiers and added 3.15 ones. The
-oldestenvs run on 3.11 and the-latestenvs on 3.11 and 3.15, so CI stays at 65 jobs. Conformance stays on 3.14.Known gaps:
pydantic==2.12.5for PyPy 3.10, which blocked 3.15. It's 2.14.1 now and the Renovate rule for it is gone.typing.Self,datetime.UTC).uv lockalready fails on main (qwenpaw and onnxruntime at 3.14), so I updated the existing lock. Only 3.10 entries were dropped.Type of change
How has this been tested?
uv run tox -e precommit,typecheck,check-util-apianthropic-latest fails 13 beta tests with anthropic 2.3.0 on every Python version. It fails the same way on main. With anthropic 2.2.0 all 385 pass on 3.15.
Checklist
See CONTRIBUTING.md
for the style guide, changelog guidance, and more.