Skip to content

fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer) - #7296

Closed
FCHEHIDI wants to merge 1 commit into
crewAIInc:mainfrom
FCHEHIDI:fix/chromadb-python-3.14-compat
Closed

fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer)#7296
FCHEHIDI wants to merge 1 commit into
crewAIInc:mainfrom
FCHEHIDI:fix/chromadb-python-3.14-compat

Conversation

@FCHEHIDI

@FCHEHIDI FCHEHIDI commented Sep 6, 2026

Copy link
Copy Markdown

Fixes #7297

Problem

crewai pins chromadb~=1.1.0, which still ships the pydantic.v1.BaseSettings
compatibility layer. That layer is broken on Python 3.14, which dropped the
__fields__ introspection mechanism pydantic v1 relies on:

pydantic.v1.errors.ConfigError: unable to infer type for attribute "chroma_server_nofile"

This breaks import crewai outright on 3.14 — before any user code runs.

Root cause

Already fixed upstream in chroma-core/chroma#6356 (dropped the pydantic v1
compat layer), released in chromadb 1.5.x. crewai's own pin just predates
that fix.

Fix

  • Bump the floor to chromadb>=1.5.9,<2 in lib/crewai/pyproject.toml.
  • Raise requires-python from <3.14 to <3.15 across the workspace
    members so the bump is actually installable on 3.14.

Verification

Ran the full lib/crewai test suite (4745 tests) under both configurations,
with a reduced sync (uv sync --package crewai --all-groups, no
--all-extras) to keep the comparison apples-to-apples on this machine:

Failed Passed Skipped
before (py3.13, chromadb 1.1.1) 365 4311 65
after (py3.14, chromadb 1.5.9) 358 4318 65
  • Zero new failures introduced by the bump (diffed the two failure sets).
  • 7 previously-failing knowledge-source tests now pass with chromadb 1.5.9
    (test_agent_with_knowledge_sources*, test_get_knowledge_search_query,
    test_embedding_configuration_flow, test_crew_with_knowledge_sources_works_with_copy).
  • All remaining failures are identical on both sides and come from optional
    extras not installed in this reduced comparison (litellm fallback, docling,
    qdrant, google-vertex, mcp, a2a) — unrelated to this change. Happy to also
    run this with --all-extras if useful, though av/PyAV currently fails to
    build from source on 3.14 on this machine (missing system ffmpeg dev libs),
    unrelated to chromadb.

Out of scope

This PR only unblocks installability + the existing test suite on 3.14. It
does not add 3.14 to the CI test matrix (tests.yml, type-checker.yml,
etc.) — happy to add that as a follow-up if maintainers want it in the same
PR instead.

🤖 Generated with Claude Code

chromadb~=1.1.0 still shipped the pydantic.v1.BaseSettings compat layer,
which is broken on Python 3.14 (ConfigError: unable to infer type for
chroma_server_nofile) because 3.14 dropped the __fields__ introspection
mechanism that pydantic v1 relied on. This breaks `import crewai` outright
on 3.14, before any user code runs.

Fixed upstream in chroma-core/chroma#6356 (dropped the pydantic v1 layer),
released in chromadb 1.5.x. Bump the floor to >=1.5.9,<2 and raise the
requires-python cap to <3.15 across the workspace so the fix is actually
usable.

Verified locally: full lib/crewai test suite (4745 tests) run under both
configurations (reduced sync, no optional media/docling/qdrant extras):

  before (py3.13, chromadb 1.1.1): 365 failed, 4311 passed, 65 skipped
  after  (py3.14, chromadb 1.5.9): 358 failed, 4318 passed, 65 skipped

Zero new failures introduced by the bump; 7 previously-failing
knowledge-source tests now pass. All remaining failures are identical
on both sides and stem from optional extras not installed in this
comparison (litellm fallback, docling, qdrant, google-vertex, mcp, a2a),
unrelated to this change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 6, 2026 15:44
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for the pull request.

First-time contributors need an associated open issue before we can review a PR.

  1. Open an issue with a template, or pick an existing open one.
  2. Open a new PR (or reopen this one) whose title or body mentions that issue, for example #123.

See the contributing guide.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: ddffaf0e-f99e-4d1f-8a84-e456f97ac2b2

📥 Commits

Reviewing files that changed from the base of the PR and between 143e902 and 9bf1160.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • lib/cli/pyproject.toml
  • lib/crewai-core/pyproject.toml
  • lib/crewai-files/pyproject.toml
  • lib/crewai-tools/pyproject.toml
  • lib/crewai/pyproject.toml
  • lib/devtools/pyproject.toml
  • pyproject.toml

📝 Walkthrough

Walkthrough

The project and package metadata now supports Python 3.14. The crewAI package also updates its ChromaDB constraint to a Python 3.14-compatible range.

Changes

Python 3.14 support

Layer / File(s) Summary
Python version constraints
pyproject.toml, lib/*/pyproject.toml
The project and package requires-python constraints now allow Python 3.14 and exclude Python 3.15.
ChromaDB compatibility
lib/crewai/pyproject.toml
The ChromaDB constraint changed to >=1.5.9,<2. Comments document the Python 3.14 compatibility issue in older releases.

Suggested reviewers: greysonlalonde

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are narrowly scoped to dependency/metadata updates, align with the stated root cause, and introduce no obvious correctness or packaging issues in the updated manifests.

Pull request overview

This PR updates CrewAI’s Python compatibility and dependency floor to prevent import crewai from failing on Python 3.14 due to the now-removed/broken pydantic.v1.BaseSettings compatibility layer in older chromadb releases.

Changes:

  • Raised requires-python across the workspace packages from <3.14 to <3.15 to allow installation on Python 3.14.
  • Bumped CrewAI’s chromadb dependency from ~=1.1.0 to >=1.5.9,<2, matching the upstream fix that drops the broken pydantic v1 layer.
  • Added inline rationale in lib/crewai/pyproject.toml documenting why the chromadb bump is necessary.
File summaries
File Description
pyproject.toml Expands workspace Python compatibility to include 3.14 (<3.15).
lib/devtools/pyproject.toml Matches Python compatibility bump for the devtools package.
lib/crewai/pyproject.toml Bumps chromadb floor to >=1.5.9,<2 and updates Python compatibility.
lib/crewai-tools/pyproject.toml Matches Python compatibility bump for crewai-tools.
lib/crewai-files/pyproject.toml Matches Python compatibility bump for crewai-files.
lib/crewai-core/pyproject.toml Matches Python compatibility bump for crewai-core.
lib/cli/pyproject.toml Matches Python compatibility bump for the CLI package.
Review details
  • Files reviewed: 7/8 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

crewai fails to import on Python 3.14 (chromadb~=1.1.0 pydantic v1 incompatibility)

2 participants