Skip to content

refactor(client): rename message handler callback#2596

Draft
MukundaKatta wants to merge 1 commit into
modelcontextprotocol:mainfrom
MukundaKatta:codex/python-sdk-message-callback
Draft

refactor(client): rename message handler callback#2596
MukundaKatta wants to merge 1 commit into
modelcontextprotocol:mainfrom
MukundaKatta:codex/python-sdk-message-callback

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • Rename client-facing message_handler parameters/fields to message_callback for consistency with the other callback options
  • Update ClientSession, Client, ClientSessionParameters, CLI wiring, tests, and migration docs

Closes #2588

Testing

  • uv run ruff check src/mcp/client/client.py src/mcp/client/session.py src/mcp/client/session_group.py src/mcp/client/__main__.py tests/client/test_session.py tests/client/test_session_group.py tests/client/test_logging_callback.py tests/client/test_notification_response.py tests/experimental/tasks/client/test_handlers.py tests/experimental/tasks/server/test_server.py tests/server/mcpserver/test_integration.py tests/server/test_session.py tests/shared/test_progress_notifications.py tests/shared/test_session.py tests/shared/test_streamable_http.py
  • uv run ruff format --check src/mcp/client/client.py src/mcp/client/session.py src/mcp/client/session_group.py src/mcp/client/__main__.py tests/client/test_session.py tests/client/test_session_group.py tests/client/test_logging_callback.py tests/client/test_notification_response.py tests/experimental/tasks/client/test_handlers.py tests/experimental/tasks/server/test_server.py tests/server/mcpserver/test_integration.py tests/server/test_session.py tests/shared/test_progress_notifications.py tests/shared/test_session.py tests/shared/test_streamable_http.py
  • uv run pytest tests/client/test_logging_callback.py tests/client/test_notification_response.py tests/client/test_session.py tests/client/test_session_group.py tests/experimental/tasks/client/test_handlers.py tests/experimental/tasks/server/test_server.py tests/server/mcpserver/test_integration.py tests/server/test_session.py tests/shared/test_progress_notifications.py tests/shared/test_session.py tests/shared/test_streamable_http.py -q

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.

ClientConfig has inconsistent naming: message_handler should be message_callback

1 participant