-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Preserve default total client timeout value #7275
base: master
Are you sure you want to change the base?
Conversation
…e specific, timeout value is changed
Not sure if the documentation should be updated. Currently, it does not describe the behavior that this PR is changing, and the new behavior is somewhat expected, IMHO. |
It says it defaults to None: |
I guess I need glasses :) Updated. |
@@ -134,7 +134,7 @@ | |||
|
|||
@dataclasses.dataclass(frozen=True) | |||
class ClientTimeout: | |||
total: Optional[float] = None | |||
total: Optional[float] = 5 * 60 # 5 minute default timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, is this the expected behaviour if a user were to do something like
ClientTimeout(sock_read=600)
?
i.e. They set sock_read to 10 mins, but total is still set to 5 mins, so it achieves nothing.
I'm not sure now if having this default value makes things simpler or more complex...
@webknjaz Any thoughts?
What do these changes do?
Changed default value for
ClientTimeout.total
so that the default is always present, even if not explicitly specified.Are there changes in behavior for the user?
If a user wants to adjust some specific client timeout, i.e.
connect
orsock_connect
, they won't need to explicitly specifytotal
timeout value in order to preserve it.Related issue number
Closes #7274
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.