Skip to content

feat(core): Remove EOL Python 3.10 support - #41267

Merged
ccurme (ccurme) merged 7 commits into
langchain-ai:masterfrom
cbornet:remove-py310
Nov 11, 2026
Merged

ccurme (ccurme) merged 7 commits into
langchain-ai:masterfrom
cbornet:remove-py310

Conversation

@cbornet

@cbornet Christophe Bornet (cbornet) commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator
  • Python 3.10 is EOL
  • We can modernize the code
  • We can remove code specific for 3.10
  • Remove tests on 3.10 for all modules as some depend on langchain-core

@github-actions github-actions Bot added core `langchain-core` package issues & PRs dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) size: L 500-999 LOC labels Oct 16, 2026
@langchain-oss-automated-triage langchain-oss-automated-triage Bot added trusted-contributor >= 5 merged PRs in the `langchain-ai/langchain` repo external labels Oct 16, 2026
@codspeed

codspeed Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing cbornet:remove-py310 (5a43b12) with master (8b8969f)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@cbornet Christophe Bornet (cbornet) changed the title Remove EOL Python 3.10 support feat(core): Remove EOL Python 3.10 support Oct 16, 2026
@github-actions github-actions Bot added the feature For PRs that implement a new feature; NOT A FEATURE REQUEST label Oct 16, 2026
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Oct 16, 2026

@BichengWang Bicheng (BichengWang) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] test-dependents cannot use its own matrix to define python-version.

At head f6c247de40e56d0747fead679ad1a5177fa0930c, the new python-version: ${{ matrix.python-version }} in strategy.matrix makes the Integration Tests workflow invalid. The matrix context is unavailable while GitHub evaluates strategy, so this blocks scheduled and manually dispatched runs before the jobs start. GitHub's context availability reference lists only github, needs, vars, and inputs for this location.

The compute-matrix output already contains the Python versions. This replacement passes validation and preserves the override:

python-version: ${{ fromJSON(needs.compute-matrix.outputs.matrix).python-version }}

I ran actionlint 1.7.12 with -shellcheck= -pyflakes= on the complete workflow: the PR base (c088db971097f0f12c7b8c30d473e8dbde09c823) and current master (b7b942a7ffd3206e1b572f4d0639377bca4750d7) pass; this head fails with context "matrix" is not allowed here; a temporary copy with the replacement passes. I also executed the head's matrix-generation shell step offline: it emits ["3.11", "3.14"] by default and ["3.12"] with that override.

This review is scoped to the integration workflow change.

@cbornet

Copy link
Copy Markdown
Collaborator Author

Fixed integration test.

py_versions = ["3.11", "3.12", "3.13", "3.14"]
else:
py_versions = ["3.10", "3.14"]
py_versions = ["3.11", "3.14"]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most libs depend on core so we can't test them in 3.10 anymore.

# Conflicts:
#	.github/scripts/check_diff.py
#	libs/core/pyproject.toml
#	libs/core/tests/unit_tests/document_loaders/test_langsmith.py
#	libs/core/uv.lock

@ccurme ccurme (ccurme) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this!

@ccurme
ccurme (ccurme) merged commit 1dd41b2 into langchain-ai:master Nov 11, 2026
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) external feature For PRs that implement a new feature; NOT A FEATURE REQUEST github_actions Pull requests that update GitHub Actions code size: L 500-999 LOC trusted-contributor >= 5 merged PRs in the `langchain-ai/langchain` repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants