aio-libs
aiohttp
BlogDocsChangelog

[PR #10154/3f07b1a3 backport][3.11] Update StreamResponse.write annotation for strict-bytes

#10157Merged
Comparing
patchback/backports/3.11/3f07b1a38beffc350adbf51a605d27fe306de66c/pr-10154
(
395fe83
) with
3.11
(
b770b1a
)
CodSpeed Performance Gauge
0%
Untouched
46
Ignored
1

Benchmarks

Passed

test_resolve_multiple_level_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
8.8 ms8.8 ms
test_create_client_request_with_cookies[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
+1%
130.1 µs129.2 µs
test_one_hundred_simple_get_requests_multiple_methods_route[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
+1%
32.5 ms32.3 ms
test_one_hundred_simple_get_requests[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
+1%
32.8 ms32.6 ms
test_resolve_gitapi[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
309 ms307.2 ms
test_one_hundred_simple_post_requests[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
+1%
37.3 ms37.1 ms
test_resolve_dynamic_resource_url_with_many_dynamic_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
3.6 ms3.6 ms
test_ten_web_middlewares[pyloop]
tests/test_benchmarks_web_middleware.py
CodSpeed Performance Gauge
+1%
35.6 ms35.4 ms
test_resolve_gitapi_subapps[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
+1%
313.1 ms311.5 ms
test_simple_web_file_response_not_modified[pyloop]
tests/test_benchmarks_web_fileresponse.py
CodSpeed Performance Gauge
+1%
56.5 ms56.2 ms
test_simple_web_file_sendfile_fallback_response[pyloop]
tests/test_benchmarks_web_fileresponse.py
CodSpeed Performance Gauge
0%
85.9 ms85.5 ms
test_one_hundred_get_requests_with_30000_content_length_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
39.7 ms39.5 ms
test_one_hundred_get_requests_with_1024_content_length_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
35.8 ms35.6 ms
test_one_hundred_get_requests_with_1024_chunked_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
36.1 ms36 ms
test_serialize_headers
tests/test_benchmarks_http_writer.py
CodSpeed Performance Gauge
0%
1,001.7 µs997.6 µs
test_resolve_static_root_route[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_one_hundred_get_requests_with_30000_chunked_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
42.6 ms42.4 ms
test_resolve_root_route[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
906.7 µs903.3 µs
test_create_client_request_with_headers[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
0%
71 µs70.7 µs
test_simple_web_file_response[pyloop]
tests/test_benchmarks_web_fileresponse.py
CodSpeed Performance Gauge
0%
79.9 ms79.7 ms
test_send_one_hundred_websocket_text_messages_with_mask[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
808.1 µs805.9 µs
test_resolve_single_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
909.6 µs907.2 µs
test_send_client_request_one_hundred[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
0%
2.5 ms2.5 ms
test_resolve_dynamic_resource_url_with_many_static_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
3.7 ms3.6 ms
test_simple_web_response
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
460.4 µs459.6 µs
test_web_response_with_text_body
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
666.8 µs666.1 µs
test_resolve_prefix_resources_many_prefix_many_plain[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
5 ms5 ms
test_read_one_hundred_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
302.6 µs302.5 µs
test_one_thousand_large_round_trip_websocket_text_messages[pyloop]
tests/test_benchmarks_client_ws.py
CodSpeed Performance Gauge
0%
23.3 ms23.3 ms
test_read_large_binary_websocket_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
9.1 ms9.1 ms
test_load_cookies_into_temp_cookiejar
tests/test_benchmarks_cookiejar.py
CodSpeed Performance Gauge
0%
206.1 µs206.1 µs
test_resolve_root_route_with_many_fixed_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
905 µs904.9 µs
test_get_request_with_251308_compressed_chunked_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
464.8 ms464.9 ms
test_resolve_gitapi_root[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
2.1 ms2.1 ms
test_web_response_with_bytes_body
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
549.6 µs549.8 µs
test_one_thousand_round_trip_websocket_text_messages[pyloop]
tests/test_benchmarks_client_ws.py
CodSpeed Performance Gauge
0%
17.7 ms17.7 ms
test_one_thousand_round_trip_websocket_binary_messages[pyloop]
tests/test_benchmarks_client_ws.py
CodSpeed Performance Gauge
0%
17.2 ms17.2 ms
test_one_hundred_get_requests_with_512kib_content_length_payload[pyloop]
tests/test_benchmarks_client.py
CodSpeed Performance Gauge
0%
165.3 ms165.4 ms
test_send_one_hundred_large_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
540.7 µs541.4 µs
test_simple_web_stream_response
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
245.4 µs245.8 µs
test_send_one_hundred_websocket_compressed_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
0%
3.2 ms3.2 ms
test_resolve_multiple_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
test_web_response_with_headers
tests/test_benchmarks_web_response.py
CodSpeed Performance Gauge
0%
889.2 µs893.1 µs
test_resolve_dynamic_resource_url_with_many_dynamic_routes_with_common_prefix[pyloop]
tests/test_benchmarks_web_urldispatcher.py
CodSpeed Performance Gauge
-1%
257.6 ms259.8 ms
test_client_request_update_cookies[pyloop]
tests/test_benchmarks_client_request.py
CodSpeed Performance Gauge
-1%
173.3 µs175.4 µs
test_send_one_hundred_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py
CodSpeed Performance Gauge
-2%
562.8 µs572.4 µs

Ignored

test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop]
tests/test_benchmarks_client.py
Ignored
CodSpeed Performance Gauge
0%
211.9 ms211.9 ms

Commits

Click on a commit to change the comparison range
Base
3.11
b770b1a
+0.13%
Update StreamResponse.write annotation for strict-bytes (#10154) ## What do these changes do? Mypy will add a `--strict-bytes` flag. https://github.com/python/mypy/pull/18263 With that `bytearray` and `memoryview` are no longer subclasses of `bytes` and must be listed explicitly instead if they are supported. ## Are there changes in behavior for the user? -- ## Related issue number -- ## 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 &lt;Name&gt; &lt;Surname&gt;. * Please keep alphabetical order, the file is sorted by names. - [ ] 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 3f07b1a38beffc350adbf51a605d27fe306de66c)
395fe83
11 months ago
by cdce8p
© 2025 CodSpeed Technology
Home Terms Privacy Docs