[3.11] Fixup for Cython version 3.1.0
With Cython v3.1.0 + aiohttp v3.11.18 will generate following error
message:
cython -3 -o aiohttp/_websocket/reader_c.c aiohttp/_websocket/reader_c.py -I aiohttp -Werror
Error compiling Cython file:
------------------------------------------------------------
...
def exception(self) -> Optional[BaseException]:
return self._exception
def set_exception(
self,
exc: "BaseException",
^
------------------------------------------------------------
aiohttp/_websocket/reader_c.py:82:13: Strings should no longer be used for type declarations. Use 'cython.int' etc. directly.
This PR include minimal changes backport from master branch, in order to
fix above issue with Cython v3.1.0.
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>