Skip to content

add example of setting network interface in custom socket creation #10962

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

Merged
merged 2 commits into from
May 23, 2025

Conversation

Cycloctane
Copy link
Member

@Cycloctane Cycloctane commented May 23, 2025

What do these changes do?

Some users may want to specific network interface used by client session (as in #6383 and #7132 ). In aiohttp 3.12, this can be done more gracefully with socket_factory in TCPConnector. I think it would be helpful to mention it in socket_factory's documentation as one of its common usecases.

Are there changes in behavior for the user?

Is it a substantial burden for the maintainers to support this?

Related issue number

closes #7132

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

@Cycloctane Cycloctane added the documentation Improvements or additions to documentation label May 23, 2025
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.76%. Comparing base (cc234c6) to head (5d66ccc).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10962   +/-   ##
=======================================
  Coverage   98.76%   98.76%           
=======================================
  Files         129      129           
  Lines       39541    39541           
  Branches     2185     2185           
=======================================
+ Hits        39051    39054    +3     
+ Misses        342      339    -3     
  Partials      148      148           
Flag Coverage Δ
CI-GHA 98.64% <ø> (+<0.01%) ⬆️
OS-Linux 98.35% <ø> (+<0.01%) ⬆️
OS-Windows 96.53% <ø> (-0.01%) ⬇️
OS-macOS 97.50% <ø> (-0.01%) ⬇️
Py-3.10.11 97.40% <ø> (-0.01%) ⬇️
Py-3.10.17 97.93% <ø> (ø)
Py-3.11.12 98.02% <ø> (+<0.01%) ⬆️
Py-3.11.9 97.48% <ø> (-0.01%) ⬇️
Py-3.12.10 98.41% <ø> (ø)
Py-3.13.3 98.40% <ø> (ø)
Py-3.9.13 97.27% <ø> (+<0.01%) ⬆️
Py-3.9.22 97.80% <ø> (ø)
Py-pypy7.3.16 86.00% <ø> (-7.05%) ⬇️
VM-macos 97.50% <ø> (-0.01%) ⬇️
VM-ubuntu 98.35% <ø> (+<0.01%) ⬆️
VM-windows 96.53% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented May 23, 2025

CodSpeed Performance Report

Merging #10962 will not alter performance

Comparing Cycloctane:socket_factory_docs_update (5d66ccc) with master (cc234c6)

Summary

✅ 59 untouched benchmarks

@bdraco bdraco added the backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot label May 23, 2025
@bdraco bdraco added this to the 3.12 milestone May 23, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label May 23, 2025
@bdraco
Copy link
Member

bdraco commented May 23, 2025

Thanks @Cycloctane

@bdraco bdraco enabled auto-merge (squash) May 23, 2025 13:24
@bdraco bdraco merged commit 84decfe into aio-libs:master May 23, 2025
41 checks passed
Copy link
Contributor

patchback bot commented May 23, 2025

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/84decfe5fce79a4ca29fdc5c7317fc85f3d908f5/pr-10962

Backported as #10966

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 23, 2025
bdraco added a commit that referenced this pull request May 23, 2025
…terface in custom socket creation (#10966)

Co-authored-by: Cycloctane <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
closes #7132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants