swagger-api / swagger-api/swagger-codegen
[python] asyncio aiohttp.ClientSession doesn't have proxy in __init__
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
proxy is not a valid argument to aiohttp.ClientSession. As far as I can tell, it hasn't ever been -- which makes this even more confusing, since that means this has always been wrong?
Swagger-codegen version
current
Swagger declaration file content or url
The python asyncio rest.py template is invalid
Command line used for generation
--library asyncio
Steps to reproduce
Generate any async code
Related issues/PRs
None
Suggest a fix/enhancement
aiohttp.ClientSession doesn't take a proxy (although it might at some point). However, session.request does. So, possibly, just store the proxy info as part of RESTClientObject and pass it along to request in args here
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 with modules/swagger-codegen/src/main/resources/python/asyncio/rest.mustache, especially lines 63-67 and the request call near line 155. Generate any async code with --library asyncio and verify the generated code no longer passes proxy to aiohttp.ClientSession; proxy handling should instead be passed to session.request if supported by the template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100