fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer) - #7296
fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer)#7296FCHEHIDI wants to merge 1 commit into
Conversation
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>
|
Thanks for the pull request. First-time contributors need an associated open issue before we can review a PR.
See the contributing guide. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe project and package metadata now supports Python 3.14. The crewAI package also updates its ChromaDB constraint to a Python 3.14-compatible range. ChangesPython 3.14 support
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🟢 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-pythonacross the workspace packages from<3.14to<3.15to allow installation on Python 3.14. - Bumped CrewAI’s
chromadbdependency from~=1.1.0to>=1.5.9,<2, matching the upstream fix that drops the broken pydantic v1 layer. - Added inline rationale in
lib/crewai/pyproject.tomldocumenting why thechromadbbump 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.
Fixes #7297
Problem
crewaipinschromadb~=1.1.0, which still ships thepydantic.v1.BaseSettingscompatibility layer. That layer is broken on Python 3.14, which dropped the
__fields__introspection mechanism pydantic v1 relies on:This breaks
import crewaioutright 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 predatesthat fix.
Fix
chromadb>=1.5.9,<2inlib/crewai/pyproject.toml.requires-pythonfrom<3.14to<3.15across the workspacemembers so the bump is actually installable on 3.14.
Verification
Ran the full
lib/crewaitest 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:(
test_agent_with_knowledge_sources*,test_get_knowledge_search_query,test_embedding_configuration_flow,test_crew_with_knowledge_sources_works_with_copy).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-extrasif useful, thoughav/PyAV currently fails tobuild 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