ITADN

Cython compilation error (redeclarations)

#12709Openkiefernforst 创建于 2026-05-27
bugneeds-info
K
kiefernforstcommented
### Describe the bug Python 3.10, Cython 3.2.5 _freethreading_compatible=False_ has been tried by me. ### To Reproduce ``` export AIOHTTP_USE_SYSTEM_DEPS=1 make cythonize python -m build --wheel --no-isolation ``` ### Expected behavior successful compilation like with aiohttp 3.13.3 ### Logs/tracebacks ```python-traceback cython -3 -X freethreading_compatible=True -o aiohttp/_websocket/reader_c.c aiohttp/_websocket/reader_c.py -I aiohttp -Werror Error compiling Cython file: ------------------------------------------------------------ ... WSMessageText, WSMessageTextBytes, WSMsgType, ) ALLOWED_CLOSE_CODES: Final[set[int]] = {int(i) for i in WSCloseCode} ^ ------------------------------------------------------------ aiohttp/_websocket/reader_c.py:27:0: 'ALLOWED_CLOSE_CODES' redeclared Error compiling Cython file: ------------------------------------------------------------ ... def _feed_data(self, data: bytes) -> None: """Return the next frame from the socket.""" if self._tail: data, self._tail = self._tail + data, b"" start_pos: int = 0 ^ ------------------------------------------------------------ aiohttp/_websocket/reader_c.py:350:8: 'start_pos' redeclared ``` ### Python Version ```console 3.10 ``` ### aiohttp Version ```console 93de128a2ffa265e6f697dec11998745553977fa ``` ### multidict Version ```console 110eaeac7e48db6dc66382a6e8f4c21f9e27336a (>6.7.2) ``` ### propcache Version ```console 0.4.1 ``` ### yarl Version ```console 1.23.0 ``` ### OS Arch-based ### Related component Client ### Additional context _No response_ ### Code of Conduct - [x] I agree to follow the aio-libs Code of Conduct
6 条评论