swagger-api / swagger-api/swagger-codegen
Python: Cannot configure urllib3 retry behavior
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'm attempting to change the backoff policy for urllib3. This is supported behavior on both the request and the pool. (docs). Because RESTClientObject doesn't allow specifying addition_pool_args, there's no way to configure that.
Swagger-codegen version
2.4.31
Command line used for generation
swagger-codegen generate -i http://localhost:8080/swagger.json -l python -o api_client/ -c swagger_config.json
Swagger config:
{
"packageName": "drone_client",
"projectName": "drone_api"
}
Steps to reproduce
Nothing special. Any python client should do this.
Related issues/PRs
I couldn't find any.
Suggest a fix/enhancement
Allow me to pass in additional options which are passed to the pool, or at minimum, specify a Retry object.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the generated Python client's RESTClientObject and compare its urllib3 pool configuration with the urllib3 Retry documentation linked in the issue. Determine how to expose additional pool options or a Retry object, then verify that a generated Python client can configure the requested backoff policy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100