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 Happy Eyeballs support to TCPConnector #5471

Closed
wants to merge 1 commit into from

Conversation

illia-v
Copy link
Contributor

@illia-v illia-v commented Feb 13, 2021

What do these changes do?

They add Happy Eyeballs support to TCPConnector and enable it by default.

Are there changes in behavior for the user?

aiohttp should become more responsive to users having dual-stack configuration.

For example, Go enabled Happy Eyeballs (Fast Fallback) by default in 2018 golang/go@efc1850.

Also, in #4446 (comment) @asvetlov wrote that Happy Eyeballs may help with enabling aiodns by default. But I would not do so for now because pycares that is a dependency of aiodns uses an old version of c-ares that has security vulnerabilities.

Related issue number

Closes #4451

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

@illia-v illia-v requested a review from asvetlov as a code owner February 13, 2021 20:15
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 13, 2021
@codecov
Copy link

codecov bot commented Feb 13, 2021

Codecov Report

Merging #5471 (44e4a76) into master (10c8ce9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5471   +/-   ##
=======================================
  Coverage   97.17%   97.17%           
=======================================
  Files          41       41           
  Lines        8769     8774    +5     
  Branches     1404     1405    +1     
=======================================
+ Hits         8521     8526    +5     
  Misses        130      130           
  Partials      118      118           
Flag Coverage Δ
unit 97.04% <83.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/connector.py 96.54% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10c8ce9...44e4a76. Read the comment docs.

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.

Adding runtime-dependent behavior defaults is not the best idea: it should be consistent across envs. I don't think we should enable this by default but rather make it opt-in for as long as we support CPython versions below 3.8. If we were to have it on by default, it needs to be supported across all runtimes equally, otherwise, end-users would be confused as to what magic happens in some envs but not others, for example, by relying on a backport.

Also, this sort of change needs to be bundled with updates to tests and to docs.

@illia-v
Copy link
Contributor Author

illia-v commented Feb 26, 2021

I am closing this because the change has no effect 🙁. See #4451 (comment)

@illia-v illia-v closed this Feb 26, 2021
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 client enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Happy Eyeballs from Python 3.8
2 participants