Skip to content

[python] asyncio aiohttp.ClientSession doesn't have proxy in __init__ #9995

@ntextreme3

Description

@ntextreme3
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

if configuration.proxy:
self.pool_manager = aiohttp.ClientSession(
connector=connector,
proxy=configuration.proxy
)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions