Skip to content
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

Allow passing trust_env to aiohttp.ClientSession #368

Closed
michaeloliverx opened this issue Apr 11, 2023 · 1 comment · Fixed by #438
Closed

Allow passing trust_env to aiohttp.ClientSession #368

michaeloliverx opened this issue Apr 11, 2023 · 1 comment · Fixed by #438
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@michaeloliverx
Copy link

Is your feature request related to a problem?

I want to pass trust_env=True to the aiohttp.ClientSession here:

self.session = aiohttp.ClientSession(
headers=self.headers,
skip_auto_headers=("accept", "accept-encoding"),
auto_decompress=True,
loop=self.loop,
cookie_jar=aiohttp.DummyCookieJar(),
response_class=OpenSearchClientResponse,
connector=aiohttp.TCPConnector(
limit=self._limit, use_dns_cache=True, ssl=self._ssl_context
),
)

This will allow allow proxy configuration via HTTPS_PROXY environment variables.
See https://docs.aiohttp.org/en/latest/client_advanced.html?highlight=proxy#proxy-support

What solution would you like?

AsyncOpenSearch to accept the trust_env keyword argument and pass it onto the connection class.

@michaeloliverx michaeloliverx added enhancement New feature or request untriaged Need triage labels Apr 11, 2023
@harshavamsi harshavamsi added good first issue Good for newcomers and removed untriaged Need triage labels Apr 12, 2023
@Temirlan-qa
Copy link

@michaeloliverx I have made a PR to solve this issue 372

michaeloliverx added a commit to michaeloliverx/opensearch-py that referenced this issue Jul 19, 2023
Fixes opensearch-project#368

Signed-off-by: Michael Oliver <michael@michaeloliver.dev>
dblock pushed a commit that referenced this issue Jul 19, 2023
Fixes #368

Signed-off-by: Michael Oliver <michael@michaeloliver.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
3 participants