diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..8886450f63 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,4 @@ +Release type: patch + +This release fixes a TypeError on Python 3.8 due to us using a +`asyncio.Queue[Tuple[bool, Any]](1)` instead of `asyncio.Queue(1)`. diff --git a/strawberry/http/async_base_view.py b/strawberry/http/async_base_view.py index 9e3ace71d1..86993e6f59 100644 --- a/strawberry/http/async_base_view.py +++ b/strawberry/http/async_base_view.py @@ -233,7 +233,7 @@ def _stream_with_heartbeat( self, stream: Callable[[], AsyncGenerator[str, None]] ) -> Callable[[], AsyncGenerator[str, None]]: """Adds a heartbeat to the stream, to prevent the connection from closing when there are no messages being sent.""" - queue = asyncio.Queue[Tuple[bool, Any]](1) + queue: asyncio.Queue[Tuple[bool, Any]] = asyncio.Queue(1) cancelling = False