Skip to content

[Docs] Clarify behavior of timeout parameter in requests.get #7350

@MA-Hamodi

Description

@MA-Hamodi

Description

The current documentation for the timeout parameter in requests.get() does not clearly explain that it applies to both connection and read timeouts unless specified otherwise.

This can be confusing for users who expect it to behave as a total request timeout.

Suggested Improvement

Add clarification in the docs that:

  • A single float applies to both connect and read timeouts
  • A tuple can be used to specify them separately

Example:

requests.get(url, timeout=(connect_timeout, read_timeout))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions