8000 Restore compatibility with Python < 3.9. · python-websockets/websockets@70fadbf · GitHub
[go: up one dir, main page]

Skip to content

Commit 70fadbf

Browse files
committed
Restore compatibility with Python < 3.9.
Fix #951.
1 parent 217ac2d commit 70fadbf

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ They may change at any time.
3030

3131
*In development*
3232

33+
9.0.2
34+
.....
35+
36+
*In development*
37+
38+
* Restored compatibility of ``python -m websockets`` with Python < 3.9.
39+
3340
9.0.1
3441
.....
3542

src/websockets/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ def main() -> None:
178178

179179
# Due to zealous removal of the loop parameter in the Queue constructor,
180180
# we need a factory coroutine to run in the freshly created event loop.
181-
async def queue_factory() -> asyncio.Queue[str]:
181+
async def queue_factory() -> "asyncio.Queue[str]":
182182
return asyncio.Queue()
183183

184184
# Create a queue of user inputs. There's no need to limit its size.
185-
inputs: asyncio.Queue[str] = loop.run_until_complete(queue_factory())
185+
inputs: "asyncio.Queue[str]" = loop.run_until_complete(queue_factory())
186186

187187
# Create a stop condition when receiving SIGINT or SIGTERM.
188188
stop: asyncio.Future[None] = loop.create_future()

0 commit comments

Comments
 (0)
0