Skip to content

[3.11] Fixup for Cython version 3.1.0 #10849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions aiohttp/_websocket/reader_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import asyncio
import builtins
from collections import deque
from typing import Deque, Final, Optional, Set, Tuple, Union
from typing import Deque, Final, Optional, Set, Tuple, Type, Union

from ..base_protocol import BaseProtocol
from ..compression_utils import ZLibDecompressor
Expand Down Expand Up @@ -66,20 +66,20 @@ def __init__(
self._loop = loop
self._eof = False
self._waiter: Optional[asyncio.Future[None]] = None
self._exception: Union[BaseException, None] = None
self._exception: Union[Type[BaseException], BaseException, None] = None
self._buffer: Deque[Tuple[WSMessage, int]] = deque()
self._get_buffer = self._buffer.popleft
self._put_buffer = self._buffer.append

def is_eof(self) -> bool:
return self._eof

def exception(self) -> Optional[BaseException]:
def exception(self) -> Optional[Union[Type[BaseException], BaseException]]:
return self._exception

def set_exception(
self,
exc: "BaseException",
exc: Union[Type[BaseException], BaseException],
exc_cause: builtins.BaseException = _EXC_SENTINEL,
) -> None:
self._eof = True
Expand Down
Loading