Use `total_seconds` instead of `seconds` on timeout by Kludex · Pull Request #896 · modelcontextprotocol/python-sdk
Conversation
Since we accept timedelta, we are ignoring the other non-seconds fields, which shouldn't be the case.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates timeout initialization by replacing the use of .seconds with .total_seconds() to account for the complete precision of timedelta values.
- Update timeout in the streamable HTTP client for proper handling of timedelta fields
- Replace seconds with total_seconds() for both default and read timeout values
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Kludex
deleted the
use-total-seconds-instead-of-seconds
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters