aio-libs
aiohttp
BlogDocsChangelog

[PR #10534/3b9bb1cd backport][3.12] Replace tcp_sockopts with socket_factory

#10574Merged
Comparing
patchback/backports/3.12/3b9bb1cd5677a8c8443d16184ed36856ae105cd7/pr-10534
(
ffd985f
) with
3.12
(
077e4fa
)
CodSpeed Performance Gauge
0%
Untouched
47
Ignored
2

Benchmarks

Passed

test_resolve_dynamic_resource_url_with_many_dynamic_routes_with_common_prefix[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
251.1 ms247.5 ms
test_resolve_gitapi_subapps[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
297.8 ms296 ms
test_resolve_static_root_route[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
982.2 µs976.6 µs
test_resolve_gitapi[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
295 ms293.6 ms
test_web_response_with_text_body
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
661 µs658.6 µs
test_resolve_single_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
889.1 µs885.9 µs
test_resolve_dynamic_resource_url_with_many_dynamic_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
test_web_response_with_bytes_body
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
542.2 µs540.5 µs
test_read_one_hundred_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
307.9 µs307 µs
test_client_request_update_cookies[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
0%
169.1 µs168.6 µs
test_one_thousand_round_trip_websocket_binary_messages[pyloop]
tests/test_benchmarks_client_ws.py
CodSpeed Performance Gauge
0%
17 ms17 ms
test_web_response_with_headers
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
884.8 µs882.5 µs
test_one_thousand_round_trip_websocket_text_messages[pyloop]
tests/test_benchmarks_client_ws.py
CodSpeed Performance Gauge
0%
17.5 ms17.5 ms
test_resolve_root_route_with_many_fixed_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
886.7 µs885.5 µs
test_resolve_multiple_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
2.2 ms2.2 ms
test_resolve_prefix_resources_many_prefix_many_plain[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
4.9 ms4.9 ms
test_serialize_headers
tests/test_benchmarks_http_writer.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_send_client_request_one_hundred[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
0%
2.4 ms2.4 ms
test_read_large_binary_websocket_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
9.1 ms9.1 ms
test_send_one_hundred_websocket_compressed_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
3 ms3 ms
test_get_request_with_251308_compressed_chunked_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
425.8 ms426 ms
test_one_thousand_large_round_trip_websocket_text_messages[pyloop]
tests/test_benchmarks_client_ws.py
CodSpeed Performance Gauge
0%
24.3 ms24.3 ms
test_simple_web_file_response[pyloop]
tests/test_benchmarks_web_fileresponse.py
CodSpeed Performance Gauge
0%
78.5 ms78.6 ms
test_simple_web_response
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
450.2 µs451 µs
test_resolve_gitapi_root[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
2 ms2 ms
test_resolve_root_route[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
882.6 µs884.5 µs
test_resolve_dynamic_resource_url_with_many_static_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
test_simple_web_stream_response
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
240.1 µs240.6 µs
test_one_hundred_get_requests_with_30000_content_length_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
39.4 ms39.5 ms
test_one_hundred_get_requests_with_1024_content_length_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
35.1 ms35.2 ms
test_one_hundred_get_requests_with_30000_chunked_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
40.5 ms40.6 ms
test_one_hundred_get_requests_with_512kib_content_length_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
164.7 ms165.2 ms
test_resolve_multiple_level_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
8.5 ms8.6 ms
test_one_hundred_simple_post_requests[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
36.7 ms36.9 ms
test_ten_web_middlewares[pyloop]
tests/test_benchmarks_web_middleware.py
CodSpeed Performance Gauge
0%
35 ms35.1 ms
test_one_hundred_json_post_requests[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
38.5 ms38.6 ms
test_one_hundred_simple_get_requests[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
32.2 ms32.3 ms
test_one_hundred_simple_get_requests_multiple_methods_route[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
31.9 ms32.1 ms
test_one_hundred_get_requests_with_1024_chunked_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
35.5 ms35.6 ms
test_send_one_hundred_large_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
533.6 µs536.1 µs
test_create_client_request_with_cookies[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
-1%
125.8 µs126.5 µs
test_simple_web_file_response_not_modified[pyloop]
tests/test_benchmarks_web_fileresponse.py
CodSpeed Performance Gauge
-1%
55.2 ms55.5 ms
test_send_one_hundred_websocket_text_messages_with_mask[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
-1%
797.2 µs801.9 µs
test_create_client_request_with_headers[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
-1%
69.6 µs70.2 µs
test_send_one_hundred_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
-1%
559.1 µs564.6 µs
test_simple_web_file_sendfile_fallback_response[pyloop]
tests/test_benchmarks_web_fileresponse.py
CodSpeed Performance Gauge
-1%
83.9 ms84.8 ms
test_load_cookies_into_temp_cookiejar
tests/test_benchmarks_cookiejar.py
CodSpeed Performance Gauge
-1%
200.6 µs203.4 µs

Ignored

test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop]
tests/test_benchmarks_client.py
Ignored
CodSpeed Performance Gauge
0%
166 ms166.8 ms
test_one_hundred_get_requests_iter_chunks_on_512kib_chunked_payload[pyloop]
tests/test_benchmarks_client.py
Ignored
CodSpeed Performance Gauge
-19%
96.8 ms120 ms

Commits

Click on a commit to change the comparison range
Base
3.12
077e4fa
-0.11%
Replace tcp_sockopts with socket_factory (#10534) Instead of TCPConnector taking a list of sockopts to be applied sockets created, take a socket_factory callback that allows the caller to implement socket creation entirely. Fixes #10520 <!-- Thank you for your contribution! --> Replace `tcp_sockopts` parameter with a `socket_factory` parameter that is a callback allowing the caller to own socket creation. If passed, all sockets created by `TCPConnector` are expected to come from the `socket_factory` callback. <!-- Please give a short brief about these changes. --> The only users to experience a change in behavior are those who are using the un-released `tcp_sockopts` argument to `TCPConnector`. However, using unreleased code comes with caveat emptor, and is why I felt entitled to remove the option entirely without warning. <!-- Outline any notable behaviour for the end users. --> The burden will be minimal and would only arise if `aiohappyeyeballs` changes their interface. <!-- Stop right there! Pause. Just for a minute... Can you think of anything obvious that would complicate the ongoing development of this project? Try to consider if you'd be able to maintain it throughout the next 5 years. Does it seem viable? Tell us your thoughts! We'd very much love to hear what the consequences of merging this patch might be... This will help us assess if your change is something we'd want to entertain early in the review process. Thank you in advance! --> <!-- Are there any issues opened that will be resolved by merging this change? --> <!-- Remember to prefix with 'Fixes' if it should close the issue (e.g. 'Fixes #123'). --> - [x] I think the code is well written - [x] Unit tests for the changes exist - [x] Documentation reflects the changes - [x] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` * The format is &lt;Name&gt; &lt;Surname&gt;. * Please keep alphabetical order, the file is sorted by names. - [x] Add a new news fragment into the `CHANGES/` folder * name it `<issue_or_pr_num>.<type>.rst` (e.g. `588.bugfix.rst`) * if you don't have an issue number, change it to the pull request number after creating the PR * `.bugfix`: A bug fix for something the maintainers deemed an improper undesired behavior that got corrected to match pre-agreed expectations. * `.feature`: A new behavior, public APIs. That sort of stuff. * `.deprecation`: A declaration of future API removals and breaking changes in behavior. * `.breaking`: When something public is removed in a breaking way. Could be deprecated in an earlier release. * `.doc`: Notable updates to the documentation structure or build process. * `.packaging`: Notes for downstreams about unobvious side effects and tooling. Changes in the test invocation considerations and runtime assumptions. * `.contrib`: Stuff that affects the contributor experience. e.g. Running tests, building the docs, setting up the development environment. * `.misc`: Changes that are hard to assign to any of the above categories. * Make sure to use full sentences with correct case and punctuation, for example: ```rst Fixed issue with non-ascii contents in doctest text files -- by :user:`contributor-gh-handle`. ``` Use the past tense or the present tense a non-imperative mood, referring to what's changed compared to the last released version of this project. --------- Co-authored-by: J. Nick Koston <nick@koston.org> (cherry picked from commit 3b9bb1cd5677a8c8443d16184ed36856ae105cd7)
ffd985f
8 months ago
by TimMenninger
© 2025 CodSpeed Technology
Home Terms Privacy Docs