Skip to content

[PR #10962/84decfe5 backport][3.12] add example of setting network interface in custom socket creation #10966

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

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented May 23, 2025

This is a backport of PR #10962 as merged into master (84decfe).

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

Copy link

codspeed-hq bot commented May 23, 2025

CodSpeed Performance Report

Merging #10966 will not alter performance

Comparing patchback/backports/3.12/84decfe5fce79a4ca29fdc5c7317fc85f3d908f5/pr-10962 (6491bbf) with 3.12 (2c55e88)

Summary

✅ 59 untouched benchmarks

Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.15%. Comparing base (2c55e88) to head (6491bbf).
Report is 3 commits behind head on 3.12.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             3.12   #10966      +/-   ##
==========================================
- Coverage   98.16%   98.15%   -0.01%     
==========================================
  Files         130      130              
  Lines       39754    39754              
  Branches     2241     2241              
==========================================
- Hits        39025    39022       -3     
- Misses        557      560       +3     
  Partials      172      172              
Flag Coverage Δ
CI-GHA 98.04% <ø> (-0.01%) ⬇️
OS-Linux 97.77% <ø> (-0.01%) ⬇️
OS-Windows 95.26% <ø> (ø)
OS-macOS 96.94% <ø> (ø)
Py-3.10.11 96.83% <ø> (ø)
Py-3.10.17 97.37% <ø> (-0.01%) ⬇️
Py-3.11.12 97.47% <ø> (-0.01%) ⬇️
Py-3.11.9 96.93% <ø> (-0.01%) ⬇️
Py-3.12.10 97.83% <ø> (ø)
Py-3.13.3 97.82% <ø> (ø)
Py-3.9.13 96.72% <ø> (ø)
Py-3.9.22 97.25% <ø> (-0.01%) ⬇️
Py-pypy7.3.16 88.10% <ø> (-1.81%) ⬇️
VM-macos 96.94% <ø> (ø)
VM-ubuntu 97.77% <ø> (-0.01%) ⬇️
VM-windows 95.26% <ø> (ø)

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.

@bdraco bdraco enabled auto-merge (squash) May 23, 2025 13:56
@bdraco bdraco merged commit 11c7c43 into 3.12 May 23, 2025
35 checks passed
@bdraco bdraco deleted the patchback/backports/3.12/84decfe5fce79a4ca29fdc5c7317fc85f3d908f5/pr-10962 branch May 23, 2025 14:00
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.

2 participants