fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer) - #7298
fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer)#7298FCHEHIDI wants to merge 4 commits 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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe workspace now declares Python 3.14 support. The ChangesPython 3.14 support
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change declares Python 3.14 support, updates ChromaDB compatibility requirements, and aligns current documentation and templates. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
🟡 Changes recommended
The CLI scaffolding templates still generate pyproject.toml files pinned to <3.14, which conflicts with the PR’s goal of enabling Python 3.14 usage end-to-end.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the CrewAI workspace’s Python compatibility metadata and the crewai package’s ChromaDB dependency to restore install/import compatibility on Python 3.14 by moving off ChromaDB versions that still ship the broken pydantic.v1 compatibility layer.
Changes:
- Raised
requires-pythonupper bound from<3.14to<3.15across workspace member packages. - Bumped
crewai’schromadbdependency from~=1.1.0to>=1.5.9,<2, with inline rationale.
File summaries
| File | Description |
|---|---|
pyproject.toml |
Expands workspace-level Python support to include 3.14 by raising the upper bound to <3.15. |
lib/devtools/pyproject.toml |
Aligns devtools package Python requirement with workspace 3.14 support. |
lib/crewai/pyproject.toml |
Bumps chromadb to >=1.5.9,<2 and updates Python requirement to <3.15. |
lib/crewai-tools/pyproject.toml |
Aligns crewai-tools Python requirement with workspace 3.14 support. |
lib/crewai-files/pyproject.toml |
Aligns crewai-files Python requirement with workspace 3.14 support. |
lib/crewai-core/pyproject.toml |
Aligns crewai-core Python requirement with workspace 3.14 support. |
lib/cli/pyproject.toml |
Aligns crewai-cli Python requirement with workspace 3.14 support. |
Review details
- Files reviewed: 7/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| { name = "Joao Moura", email = "joao@crewai.com" } | ||
| ] | ||
| requires-python = ">=3.10, <3.14" | ||
| requires-python = ">=3.10, <3.15" |
Copilot review on crewAIInc#7298 pointed out that `crewai create crew` (and tool/flow/declarative_flow/json_crew) still scaffold new projects with `requires-python = ">=3.10,<3.14"`, contradicting this PR's goal of supporting Python 3.14 end-to-end. Bump the cap in all 5 template pyproject.toml files, plus the matching prose in their README.md/AGENTS.md. Verified: lib/cli/tests suite (745 tests) still passes at the same rate before/after this change (35 failing tests in test_run_declarative_flow.py and test_kickoff_flow.py are pre-existing flakiness unrelated to this diff - neither file references "3.14" or "requires-python", and the same tests fail with this change stashed out). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The code/package constraints now allow Python 3.14, but the primary README and docs/edge pages still state <3.14, creating user-facing documentation inconsistency.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 16/17 changed files
- Comments generated: 1
- Review effort level: Lite
| readme = "README.md" | ||
| requires-python = ">=3.10,<3.14" | ||
| requires-python = ">=3.10,<3.15" |
Copilot review on crewAIInc#7298 pointed out the primary README and current (docs/edge) installation/migration pages still said "<3.14", now inconsistent with the actual package constraints this PR raises to <3.15. Versioned doc snapshots under docs/v1.15.x/ are intentionally left untouched — they describe past releases that genuinely didn't support 3.14. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The crewai package README referenced by lib/crewai/pyproject.toml still states <3.14, leaving published package documentation inconsistent with the updated Python support metadata.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 26/27 changed files
- Comments generated: 1
- Review effort level: Lite
| { name = "Joao Moura", email = "joao@crewai.com" } | ||
| ] | ||
| requires-python = ">=3.10, <3.14" | ||
| requires-python = ">=3.10, <3.15" |
Copilot review on crewAIInc#7298 pointed out lib/crewai/README.md (the README published to PyPI via lib/crewai/pyproject.toml's readme field) still said "<3.14". Also caught docs/index.mdx, which had the same stale bound and isn't a versioned snapshot either. Re-swept the whole repo (excluding docs/v1.15.x/ historical snapshots) to confirm no other occurrences remain. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The dependency bump and corresponding requires-python/documentation updates are consistent, scoped, and align with the stated goal of unblocking Python 3.14 installs/imports.
Review details
- Files reviewed: 28/29 changed files
- Comments generated: 0 new
- Review effort level: Lite
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