Skip to content

Conversation

@maxisbey
Copy link
Contributor

@maxisbey maxisbey commented Oct 30, 2025

Summary

This PR adds rich, typer, python-dotenv, and websockets to the required dev dependencies.

Motivation and Context

Previously, these dependencies were only available when specific optional features were enabled (e.g., [cli], [sse]). This meant running uv sync without --all-extras wouldn't install them, which was problematic because:

  1. Test suites that import these libraries would fail when developers ran uv sync without --all-extras
  2. The --all-extras flag had to be remembered and used consistently across development workflows
  3. CI workflows required --all-extras to function properly

This change makes development more ergonomic by ensuring all dependencies needed for testing are always present.

How Has This Been Tested?

  • Verified that uv sync now includes rich, typer, python-dotenv, and websockets
  • Confirmed CI workflow changes (removed --all-extras) still work correctly

Breaking Changes

None - this only affects development workflow, not the published package.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The main benefit is that uv sync now "just works" without needing to remember --all-extras. The CI workflow has been updated to remove the --all-extras flag since it's no longer needed.

This change moves pytest and anyio from optional dev dependencies to required
dependencies to prevent issues when running `uv sync` without `--all-extras`.

Changes:
- Moved pytest and anyio to main dependencies in pyproject.toml
- Removed `--all-extras` flag from CI workflow since it's no longer needed
- This prevents developers from accidentally running sync without test deps

The `--all-extras` flag was previously required in CI and local development,
which was error-prone since running `uv sync` would remove test dependencies,
breaking the ability to run tests.
@maxisbey maxisbey marked this pull request as draft October 30, 2025 20:17
@maxisbey
Copy link
Contributor Author

Marked this as draft as I'm not actually sure this is the best approach here. Basically, I was annoyed having to remember to type --all-extras, and was thinking it just makes more sense to include the optional dependencies in the dev dependencies by default.

Otherwise, maybe would it be better to just mark the tests that rely on those optional dependencies to skip if they're not installed? But what if that just masks issues down the road?

Comment on lines +63 to +67
# Optional dependencies needed for testing
"rich>=13.9.4",
"typer>=0.16.0",
"python-dotenv>=1.0.0",
"websockets>=15.0.1",
Copy link
Member

Choose a reason for hiding this comment

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

This is the same as: https://github.com/Kludex/starlette/pull/2999/files#r2327181201

Suggested change
# Optional dependencies needed for testing
"rich>=13.9.4",
"typer>=0.16.0",
"python-dotenv>=1.0.0",
"websockets>=15.0.1",
# Optional dependencies needed for testing
"mcp[rich, cli, ws]"

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.

3 participants