Skip to content

Use total_seconds instead of seconds on timeout #896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Jun 6, 2025

Since we accept timedelta, we are ignoring the other non-seconds fields, which shouldn't be the case.

@Kludex Kludex requested a review from Copilot June 7, 2025 14:24
Copy link

@Copilot Copilot AI left a comment

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

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

Lgtm

@Kludex Kludex merged commit b0b44c2 into main Jun 7, 2025
13 checks passed
@Kludex Kludex deleted the use-total-seconds-instead-of-seconds branch June 7, 2025 20:11
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.

2 participants