Avatar for the aio-libs user
aio-libs
aiohttp
BlogDocsChangelog

Performance History

Latest Results

[PR #13336/664b1d2a backport][3.15] Add interlock-cb to third-party libraries (#13531) **This is a backport of PR #13336 as merged into master (664b1d2a705d86974ec516005fb8b40bc85f0c16).** Co-authored-by: Bogdan Galushko <84540747+bagowix@users.noreply.github.com>
3.15
2 hours ago
Fix Cython 3.3.0 compiler crash when compiling the WebSocket reader (#13521) ## What do these changes do? Problem: building aiohttp with Cython 3.3.0 crashes in `AnalyseDeclarationsTransform` while compiling the WebSocket reader (`make cythonize` / `python -m cython -3 --module-name aiohttp._websocket.reader_c aiohttp/_websocket/reader_py.py`). The crash is a `NoneType` annotation type in Cython's `_analyse_target_declaration`, triggered by `ALLOWED_CLOSE_CODES: Final[set[int]] = {...}` while the same name is declared `cdef set` in `reader_c.pxd`. Solution: drop the `Final` wrapper from that module-level annotation (a bare `set[int]` annotation compiles fine under both Cython 3.2.9 and 3.3.0, verified in isolation) and remove the now-unused `Final` import. With the crash gone, Cython 3.3.0 also rejects `start_pos: int = 0` in `WebSocketReader._feed_data` as a redeclaration of the `start_pos=Py_ssize_t` local from `reader_c.pxd`, so that annotation is dropped too — the `.pxd` declaration already provides the Cython type and pure-Python behavior is unchanged. Result: `reader_c.c` regenerates cleanly with both Cython 3.3.0 (previously: compiler crash) and Cython 3.2.9 (the pinned version, so no regression for current builds), using the exact command from the Makefile. WebSocket test suites pass with the pure-Python reader: `tests/test_websocket_parser.py` + `test_websocket_data_queue.py` (95 passed, 2 skipped) and `test_websocket_writer.py` + `test_web_websocket.py` (92 passed). ## Are there changes in behavior for the user? No runtime behavior change. `Final` is only a type-checker hint, and the removed local annotation changes nothing in pure-Python mode; the generated Cython code still gets `start_pos` typed as `Py_ssize_t` from the `.pxd`. ## Is it a substantial burden for the maintainers to support this? No — three lines removed, no new code paths. It just keeps the existing source compatible with newer Cython releases. ## Related issue number Fixes #13520 ## Checklist - [x] I think the code is well written - [ ] Unit tests for the changes exist - [ ] 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.
master
2 hours ago
Handle uvloop
eager-start
2 hours ago
Fix Cython 3.3.0 compiler crash when compiling the WebSocket reader (#13521) ## What do these changes do? Problem: building aiohttp with Cython 3.3.0 crashes in `AnalyseDeclarationsTransform` while compiling the WebSocket reader (`make cythonize` / `python -m cython -3 --module-name aiohttp._websocket.reader_c aiohttp/_websocket/reader_py.py`). The crash is a `NoneType` annotation type in Cython's `_analyse_target_declaration`, triggered by `ALLOWED_CLOSE_CODES: Final[set[int]] = {...}` while the same name is declared `cdef set` in `reader_c.pxd`. Solution: drop the `Final` wrapper from that module-level annotation (a bare `set[int]` annotation compiles fine under both Cython 3.2.9 and 3.3.0, verified in isolation) and remove the now-unused `Final` import. With the crash gone, Cython 3.3.0 also rejects `start_pos: int = 0` in `WebSocketReader._feed_data` as a redeclaration of the `start_pos=Py_ssize_t` local from `reader_c.pxd`, so that annotation is dropped too — the `.pxd` declaration already provides the Cython type and pure-Python behavior is unchanged. Result: `reader_c.c` regenerates cleanly with both Cython 3.3.0 (previously: compiler crash) and Cython 3.2.9 (the pinned version, so no regression for current builds), using the exact command from the Makefile. WebSocket test suites pass with the pure-Python reader: `tests/test_websocket_parser.py` + `test_websocket_data_queue.py` (95 passed, 2 skipped) and `test_websocket_writer.py` + `test_web_websocket.py` (92 passed). ## Are there changes in behavior for the user? No runtime behavior change. `Final` is only a type-checker hint, and the removed local annotation changes nothing in pure-Python mode; the generated Cython code still gets `start_pos` typed as `Py_ssize_t` from the `.pxd`. ## Is it a substantial burden for the maintainers to support this? No — three lines removed, no new code paths. It just keeps the existing source compatible with newer Cython releases. ## Related issue number Fixes #13520 ## Checklist - [x] I think the code is well written - [ ] Unit tests for the changes exist - [ ] 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. (cherry picked from commit fdebfa2b81c7f85c6dccddcbf4ab45d311970b03)
patchback/backports/3.14/fdebfa2b81c7f85c6dccddcbf4ab45d311970b03/pr-13521
3 hours ago

Latest Branches

CodSpeed Performance Gauge
+12%
Avoid using loop-specific create_task()#13530
3 hours ago
77489e7
eager-start
CodSpeed Performance Gauge
+12%
3 hours ago
22c5b6f
dependabot/pip/blockbuster-1.5.27
CodSpeed Performance Gauge
0%
[PR #13521/fdebfa2b backport][3.14] Fix Cython 3.3.0 compiler crash when compiling the WebSocket reader#13534
3 hours ago
fb74a17
patchback/backports/3.14/fdebfa2b81c7f85c6dccddcbf4ab45d311970b03/pr-13521
© 2026 CodSpeed Technology
Home Terms Privacy Docs