Skip to content

chore!: drop Python 3.10 support - #4105

Merged
julian-risch merged 4 commits into
mainfrom
chore/drop-python-3.10
Oct 16, 2026
Merged

julian-risch merged 4 commits into
mainfrom
chore/drop-python-3.10

Conversation

@julian-risch

@julian-risch julian-risch commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

Python 3.10 reaches end of life in October 2026. This PR drops it from all integrations, as the chore!: PRs in January 2026 did for 3.9:

  • Package metadata: requires-python = ">=3.11", and the Python :: 3.10 classifier is removed. This applies to the 104 integrations that still allowed 3.10 and to scripts/utils/templates/pyproject.toml.
  • Ruff autofixes: ruff now targets 3.11, and I ran ruff check --fix and ruff format in every integration (the same as hatch run fmt). The fixes it made:
    • datetime.UTC instead of timezone.utc (UP017)
    • Self and NotRequired from typing instead of typing_extensions (UP035)
    • TimeoutError instead of asyncio.TimeoutError (UP041)
    • firecrawl and watsonx: the unused timezone import is removed by hand, since F401 is unfixable in their config.
  • Public (str, Enum) classes keep their base, marked # noqa: UP042:
    • ExportType in docling and docling_serve, ConversionMode in docling_serve, Command in github, TruncationDirection in huggingface_api, RankerTruncateMode in nvidia.
    • With StrEnum, str() and f-strings would render the value instead of ExportType.MARKDOWN. That user-visible change doesn't belong in this PR. haystack kept ChatRole the same way.
  • 3.10-only workarounds removed:
    • mcp: the exceptiongroup backport dependency and its imports. The builtin ExceptionGroup is the same class on 3.11+.
    • cognee: the litellm<1.97.0; python_version < '3.11' cap and its comment.
    • sqlalchemy: the pandas 2 entry for python_version < '3.11'. It is now just pandas>=3.0.0.
  • Stale ruff target-version settings removed (py310 in deepeval, mcp, valkey and watsonx; py39 in llama_stack). Ruff now infers the target from requires-python.

How did you test it?

  • ruff check and ruff format --check pass in all 107 integrations.

  • Locally on Python 3.11, hatch run test:types and hatch run test:unit pass for 16 of the 20 integrations whose source changed, plus cognee and sqlalchemy for their dependency changes:

    Integration Unit tests passed
    amazon_bedrock 266
    anthropic 147
    azure_ai_search 97
    docling_serve 52
    firecrawl 33
    github 118
    google_genai 161
    gotenberg 72
    huggingface_api 228
    ibm_db 141
    libreoffice 29
    mcp 113
    nvidia 187
    parallel 34
    perplexity 90
    watsonx 51
    cognee 37
    sqlalchemy 15
  • docling, transformers, llama_cpp and vllm (torch, llama.cpp or vLLM builds) are covered by this PR's CI only.

Notes for the reviewer

  • test: use Python 3.11 in tests instead of 3.10 #4103 (merged) moved CI to Python 3.11. This PR changes only package metadata and code, no workflows.
  • The ! makes git-cliff mark this commit as breaking in every integration's changelog. As with the 3.9 drop, each integration's next release should be a major version.

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes — n/a, no related issue
  • I added unit tests and updated the docstrings — n/a, no behavior change
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test:.

🤖 Generated with Claude Code

julian-risch and others added 3 commits October 15, 2026 09:06
haystack-ai main (3.5.0rc0) and the upcoming 3.4.0 require Python >=3.11,
so the nightly "run unit tests with Haystack main branch" step fails on
every 3.10 leg. Move the minimum tested version to 3.11 in all workflows
and the workflow template. llama_stack's push default and coverage gates
use 3.12, its minimum version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… tests

numpy 1.22 has no cp311 wheels, so the lowest-direct job on Python 3.11
built it from source and faiss-cpu 1.8.0 failed to import with
"module compiled against API version 0x10 but this version of numpy is 0xf".
numpy 1.23.2 is the first release with cp311 wheels.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Python 3.10 reaches end of life in October 2026, and haystack-ai 3.4.0
requires Python >=3.11. Set requires-python to >=3.11 and remove the 3.10
classifier in every integration and in the pyproject template.

- Ruff now targets 3.11, so `hatch run fmt` applied its autofixes:
  `datetime.UTC` instead of `timezone.utc`, `Self`/`NotRequired` from
  `typing`, and `TimeoutError` instead of `asyncio.TimeoutError`.
- Public `(str, Enum)` classes keep their base and get `# noqa: UP042`:
  `StrEnum` would change their `str()` output.
- Remove backports that only applied to 3.10: mcp's `exceptiongroup`
  dependency, cognee's litellm cap and sqlalchemy's pandas 2 marker.
- Remove stale ruff `target-version` settings, so ruff infers the target
  from `requires-python`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (solr)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (huggingface_api)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/huggingface_api/src/haystack_integrations/components/generators/huggingface_api/chat
  chat_generator.py
  integrations/huggingface_api/src/haystack_integrations/components/rankers/huggingface_api
  ranker.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (anthropic)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat
  chat_generator.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (oracle)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (ragas)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (funasr)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (valkey)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (elasticsearch)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (whisper)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (azure_doc_intelligence)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (supabase)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (hanlp)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (opensearch)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (spacy)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (vespa)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (optimum)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (sentence_transformers)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (ollama)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (docling)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/docling/src/haystack_integrations/components/converters/docling
  converter.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (transformers)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/transformers/src/haystack_integrations/components/generators/transformers/chat
  chat_generator.py 514-517
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (ibm_db)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (llama_stack)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (llama_cpp)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/llama_cpp/src/haystack_integrations/components/generators/llama_cpp/chat
  chat_generator.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (chonkie)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (azure_documentdb)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (vllm)

This PR does not seem to contain any modification to coverable code.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (unstructured)

This PR does not seem to contain any modification to coverable code.

@julian-risch

Copy link
Copy Markdown
Member Author

@sjrl Regarding the six failures: hetzner is fixed on main now. The other five are quota/API key issues. Not related to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:agent-pack integration:aimlapi integration:alloydb integration:amazon-bedrock integration:amazon-sagemaker integration:amazon-textract integration:anthropic integration:arangodb integration:arcadedb integration:astra integration:azure-ai-search integration:azure-doc-intelligence integration:azure-documentdb integration:azure-form-recognizer integration:brave integration:chonkie integration:chroma integration:cognee integration:cohere integration:cometapi integration:datadog integration:ddgs integration:deepeval integration:docling integration:docling-serve integration:dspy integration:dynamodb integration:e2b integration:edenai integration:elasticsearch integration:faiss integration:falkordb integration:fastembed integration:firecrawl integration:funasr integration:github integration:google-drive integration:google-genai integration:gotenberg integration:hanlp integration:hetzner integration:huggingface-api integration:ibm-db integration:jina integration:kreuzberg integration:langdetect integration:langfuse integration:lara integration:libreoffice integration:linkup integration:litellm integration:llama_cpp integration:llama_stack integration:mariadb integration:markitdown integration:mcp integration:mem0 integration:microsoft-sharepoint integration:mistral integration:mongodb-atlas integration:monty integration:nvidia integration:oauth integration:ollama integration:openapi integration:opendataloader-pdf integration:openrouter integration:opensearch integration:opentelemetry integration:optimum integration:oracle integration:orcarouter integration:paddleocr integration:parallel integration:perplexity integration:pgvector integration:pinecone integration:presidio integration:pyversity integration:qdrant integration:ragas integration:rhesis integration:searchapi integration:sentence-transformers integration:serperdev integration:snowflake integration:solr integration:spacy integration:sqlalchemy integration:stackit integration:supabase integration:tavily integration:tika integration:togetherai integration:transformers integration:twelvelabs integration:typesafe integration:unstructured-fileconverter integration:valkey integration:vespa

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants