-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
feat(python): enhance retry configuration in REST client #22867
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,7 +167,7 @@ class Configuration: | |
| values before. | ||
| :param ssl_ca_cert: str - the path to a file of concatenated CA certificates | ||
| in PEM format. | ||
| :param retries: Number of retries for API requests. | ||
| :param retries: int | aiohttp_retry.RetryOptionsBase - Retry configuration. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Docstring for retries references aiohttp_retry types in a python-httpx client, which is misleading and inconsistent with this sample’s HTTP library. Prompt for AI agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since class based retries are only supported by the urllib3 and asyncio generators, but not httpx, tornado, etc. this might be misleading, as setting the class on retries has no effect on those. However before this PR the retries config option had no effect on those generators anyways |
||
| :param ca_cert_data: verify the peer using concatenated CA certificate data | ||
| in PEM (str) or DER (bytes) format. | ||
| :param cert_file: the path to a client certificate file, for mTLS. | ||
|
|
@@ -267,7 +267,7 @@ def __init__( | |
| server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, | ||
| ignore_operation_servers: bool=False, | ||
| ssl_ca_cert: Optional[str]=None, | ||
| retries: Optional[int] = None, | ||
| retries: Optional[Union[int, Any]] = None, | ||
| ca_cert_data: Optional[Union[str, bytes]] = None, | ||
| cert_file: Optional[str]=None, | ||
| key_file: Optional[str]=None, | ||
|
|
@@ -385,7 +385,7 @@ def __init__( | |
| """Safe chars for path_param | ||
| """ | ||
| self.retries = retries | ||
| """Adding retries to override urllib3 default value 3 | ||
| """Retry configuration | ||
| """ | ||
| # Enable client side validation | ||
| self.client_side_validation = True | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.