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

Add support for the no_proxy env var mechanism in the HTTP client #5556

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

scirelli
Copy link
Contributor

What do these changes do?

This is a backport of #4445
Prior to this patch aiohttp would ignore no_proxy settings.

Are there changes in behavior for the user?

If no_proxy or NO_PROXY is set, and the request host matches one of the hosts from the no_proxy list, no proxy will be used.

Need help in finding where the unit tests go for this.

Related issue number

#4431

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Mar 23, 2021
PR aio-libs#4445 by @scirelli.
Fixes aio-libs#4431.

Co-authored-by: Steve Cirelli <[email protected]>
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
(cherry picked from commit 1a4126a)
@scirelli scirelli force-pushed the backport-1a4126a-3.8 branch from 86515c8 to 8bc189b Compare March 23, 2021 01:07
else:
return proxy_info.proxy, proxy_info.proxy_auth


@attr.s(auto_attribs=True, frozen=True, slots=True)
Copy link
Contributor Author

@scirelli scirelli Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge added a @dataclasses.dataclass(frozen=True) here. But since I didn't see it used anywhere else in this file in the 3.8 code I removed it.

@mattycarroll
Copy link

Hello, I'm also affected by this bug, could this be reviewed soon please? Thanks

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants