Skip to content

chore: pin latest dependency versions with uv lock - #90

Closed
LiberiFatali wants to merge 1 commit into
FSoft-AI4Code:mainfrom
LiberiFatali:chore/pin-latest-deps
Closed

chore: pin latest dependency versions with uv lock#90
LiberiFatali wants to merge 1 commit into
FSoft-AI4Code:mainfrom
LiberiFatali:chore/pin-latest-deps

Conversation

@LiberiFatali

Copy link
Copy Markdown
Contributor

Summary

Replaces the pip-based dependency management (requirements.txt) with a uv-locked workflow and pins the latest compatible dependency stack as the repo's good state.

Key changes

  • Lockfile-based pinning: uv.lock (regenerated), .python-version, CI switched to uv sync --frozen --extra dev via astral-sh/setup-uv.
  • Latest dependency stack (verified compatible with the full test suite):
    • pydantic-ai 2.27.0 (was 1.30.x)
    • openai 2.53.0, litellm 1.96.0
    • mcp 1.29.0 — kept <2 because mcp.server.fastmcp was removed in mcp 2.0 (codewiki/src/be/caw_toolkit.py imports Context from it)
    • tree-sitter 0.26.0, griffe via griffelib 2.1.0
  • New compatibility tests (tests/test_latest_compat.py): offline import + instantiation smoke tests that pin the contracts the codebase relies on — Agent(...) construction signature, create_fallback_modelsPydanticAIBackend wiring, mcp 1.x symbols, griffe docstring imports.
  • Bugfix: guard the module-level sys.stdout = io.TextIOWrapper(...) re-wrap in codewiki/src/be/agent_tools/str_replace_editor.py so it never clobbers pytest's capture object (was crashing the test session teardown).

Verification

  • uv lock --check
  • uv run pytest tests/49 passed (42 existing + 7 new) ✓
  • uv run ruff check on changed files ✓

Notes

  • End-user install path in README.md (pip) is intentionally left unchanged.
  • mcp<2 upper bound is deliberate and documented: mcp 2.x removed the mcp.server.fastmcp module the MCP server imports.

Replace the pip-based setup (requirements.txt) with a uv-locked
workflow and pin the latest compatible dependency stack:

- pydantic-ai 2.27.0, openai 2.53.0, litellm 1.96.0,
  mcp 1.29.0 (kept <2: mcp.server.fastmcp was removed in 2.0),
  tree-sitter 0.26.0, griffe via griffelib 2.1.0
- regenerate uv.lock, add .python-version, switch CI to uv sync
- add tests/test_latest_compat.py: offline import/instantiation
  smoke tests for the pinned contracts (Agent signature, fallback
  models, mcp 1.x symbols, griffe docstring imports)
- guard the module-level sys.stdout re-wrap in str_replace_editor
  so it never clobbers pytest's capture object
@LiberiFatali LiberiFatali changed the title chore: pin latest dependency versions with uv lock refactor: pin latest dependency versions with uv lock Aug 10, 2026
@LiberiFatali
LiberiFatali deleted the chore/pin-latest-deps branch August 10, 2026 15:12
@LiberiFatali LiberiFatali changed the title refactor: pin latest dependency versions with uv lock chore: pin latest dependency versions with uv lock Aug 10, 2026
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.

1 participant