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

fix: async client always use HTTP_PROXY/HTTPS_PROXY environment variables #583

Merged
merged 4 commits into from
Jun 21, 2023

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Jun 20, 2023

Closes #563

Proposed Changes

The underlying async http client (https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession) doesn't always use HTTP_PROXY/HTTPS_PROXY environment variables.

If you want to rely on `HTTP_PROXY/HTTPS_PROXY' env vars, you need to initialize the client by:

async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", org="my-org", 
                               client_session_kwargs={'trust_env': True}) as client:
     pass

Fixed CI build - self signed certificate for testing didn't have correctly set hostname:

image

https://app.circleci.com/pipelines/github/influxdata/influxdb-client-python/2460/workflows/dfc82ea8-1821-4f1a-a63b-0a4c4c54b832/jobs/13290/tests#failed-test-0

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@bednar bednar marked this pull request as ready for review June 20, 2023 07:36
@bednar bednar requested review from powersj and Sciator June 20, 2023 07:36
@bednar bednar merged commit 8fa5146 into master Jun 21, 2023
15 checks passed
@bednar bednar deleted the trust_env branch June 21, 2023 04:15
@bednar bednar added this to the 1.35.0 milestone Jun 21, 2023
@bednar bednar modified the milestones: 1.35.0, 1.37.0 Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove hardcoded trust_env value for RestClientObjectAsync
2 participants