Skip to content

Implement proxy_form_env() function #1998

Closed
@Fuyukai

Description

Long story short

Custom keyword arguments are not provided to the request class constructor by the _request method on the client session. This prevents certain arguments from being provided (e.g. proxy_from_env) as there's no arguments on the request method for them.

Expected behaviour

They would be passed.

Actual behaviour

They aren't.

Steps to reproduce

async def something():
    async with aiohttp.ClientSession() as sess:
        async with sess.get("https://httpbin.org/ip", proxy_from_env=True) as r:
            return (await r.json())

TypeError: _request() got an unexpected keyword argument **'proxy_from_env'**

Your environment

aiohttp 2.2.0 on Python 3.5.3

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions