Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.9.6"
python-version: "3.x"
- name: Install tox
run: pip install tox
- name: Run tests with coverage
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9.6", "3.10"]
python: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions src/websockets/legacy/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ async def close(self, code: int = 1000, reason: str = "") -> None:
self.write_close_frame(Close(code, reason)),
self.close_timeout,
**loop_if_py_lt_38(self.loop),
)
) # type: ignore # remove when removing loop_if_py_lt_38
except asyncio.TimeoutError:
# If the close frame cannot be sent because the send buffers
# are full, the closing handshake won't complete anyway.
Expand All @@ -771,7 +771,7 @@ async def close(self, code: int = 1000, reason: str = "") -> None:
self.transfer_data_task,
self.close_timeout,
**loop_if_py_lt_38(self.loop),
)
) # type: ignore # remove when removing loop_if_py_lt_38
except (asyncio.TimeoutError, asyncio.CancelledError):
pass

Expand Down Expand Up @@ -1250,7 +1250,7 @@ async def keepalive_ping(self) -> None:
pong_waiter,
self.ping_timeout,
**loop_if_py_lt_38(self.loop),
)
) # type: ignore # remove when removing loop_if_py_lt_38
self.logger.debug("% received keepalive pong")
except asyncio.TimeoutError:
if self.debug:
Expand Down Expand Up @@ -1365,7 +1365,7 @@ async def wait_for_connection_lost(self) -> bool:
asyncio.shield(self.connection_lost_waiter),
self.close_timeout,
**loop_if_py_lt_38(self.loop),
)
) # type: ignore # remove when removing loop_if_py_lt_38
except asyncio.TimeoutError:
pass
# Re-check self.connection_lost_waiter.done() synchronously because
Expand Down
1 change: 1 addition & 0 deletions tests/legacy/test_client_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ async def run_client():
await server_ws.close()
with self.assertRaises(ConnectionClosed):
await ws.recv()
pass # work around bug in coverage
else:
# Exit block with an exception.
raise Exception("BOOM!")
Expand Down