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 a bug in creating proxy connection of TCPConnector. #6703

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamwonro
Copy link

@jamwonro jamwonro commented Apr 14, 2022

This fix addresses the issue where an AttributeError is raised when a
proxy response is closed due to EOF.

What do these changes do?

Fix the issue #6239.

Are there changes in behavior for the user?

Add ClientProxyClosedError handler.

Related issue number

#6239

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."

This fix addresses the issue where an AttributeError is raised when a
proxy response is closed du to EOF.
@jamwonro jamwonro requested a review from asvetlov as a code owner April 14, 2022 18:02
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Apr 14, 2022
@john-parton
Copy link
Contributor

I believe this resolves my issue. Going to try updating my application to use this patch.

@john-parton
Copy link
Contributor

Is there something specific I can do to help? I have a bunch of test cases, but I'm not sure the best way to add them to this patch.

@Dreamsorcerer
Copy link
Member

Is there something specific I can do to help? I have a bunch of test cases, but I'm not sure the best way to add them to this patch.

Test cases would be great. I guess just create a PR to this branch, or a separate PR to aiohttp that includes the commits on this branch.

@john-parton
Copy link
Contributor

I'm not sure how to write a test case that doesn't just exercise the entire request/response cycle with an actual endpoint.

I have a "test" here, but it relies on a 3rd party proxy server being up and having that specific configuration: #6239 (comment)

Not sure how to extract out the relevant bits and make it a simple unit test.

@john-parton
Copy link
Contributor

I have some additional information here: #6239 (comment)

@asvetlov Would it be possible to review this?

@Dreamsorcerer Dreamsorcerer added the pr-unfinished The PR is unfinished and may need a volunteer to complete it label Sep 11, 2024
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 pr-unfinished The PR is unfinished and may need a volunteer to complete it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants