Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c0b429b
expose all ws_connect arguments
May 7, 2024
c875fd8
wip: mirrroring websockets_base interface in aiohttp_websockets
May 8, 2024
1117d3a
black format
May 8, 2024
f3a927c
wip: add more methods in pursuit of parity
May 8, 2024
7378a53
WIP: aiohttp websockets parity
May 9, 2024
1c8eda5
answer improvements
May 30, 2024
34fc580
linting fixes
mpegman-scwx May 30, 2024
f5d208c
wip: initial tests
May 30, 2024
aa50d20
Merge branch 'aiohttp_websockets' of https://github.com/tlowery-scwx/…
May 30, 2024
b44fd45
wip: initial tests for aiohttp websockets
Jun 4, 2024
f438531
fix some minor import errors
Jun 4, 2024
8f44fc6
fix incorrect fixture
Jun 4, 2024
ef84507
update query tests to match AIOHTTPWebsocketsTransport behavior
Jun 4, 2024
9870336
wip: updating tests to follow AIOHTTPWebsockets protocol
Jun 4, 2024
6584f54
remove unnecessary websockets imports
Jun 5, 2024
fc73ba1
fix some tests
mpegman-scwx Jun 10, 2024
e4dbce8
more test fixes
mpegman-scwx Jun 10, 2024
e47ce3b
add ci test job for aiohttp_websockets
Jun 10, 2024
cd71e91
add aiohttp websocket tests for graphql websockets
Jun 14, 2024
bbddf25
update tests to AIOHTTPWebsocketsTransport
Jun 14, 2024
252969e
add missing import
Jun 14, 2024
1b729c2
set exceptions tests to expect the correct errors
Jun 14, 2024
3d99402
test updates
mpegman-scwx Jun 17, 2024
10e2172
get response headers from aiohttp client response
Jun 18, 2024
3bd3126
transport feature updates
mpegman-scwx Jun 18, 2024
2ad42ab
increase test coverage over edge cases
Jul 8, 2024
e5770c7
ran formatter
Jul 8, 2024
f28c4fe
remove unused import
Jul 8, 2024
2b25cb8
remove unnecessary timeout
Jul 12, 2024
b158614
remove hanging test
Jul 12, 2024
bae308f
re-add hanging test with skip marker and explanation
Jul 12, 2024
5acb518
Modify _receive method to be more like the websockets one
leszekhanusz Jul 13, 2024
4ec2516
Running make check
leszekhanusz Jul 13, 2024
6336eaa
Revert all code changes outside of the scope of this PR
leszekhanusz Jul 13, 2024
b6163c0
Merge branch 'master' into aiohttp_websockets
leszekhanusz Jul 13, 2024
0736dc0
Fix aiohttp_websocket ssl attribute typing
leszekhanusz Jul 13, 2024
172d65d
Revert all code changes outside of the scope of this PR - 2
leszekhanusz Jul 13, 2024
5653d56
Remove invalid aiohttp_websockets dependency from github workflow
leszekhanusz Jul 13, 2024
f1fb25d
Add the aiohttp AND websockets mark to the aiohttp_websocket tests
leszekhanusz Jul 13, 2024
3a762ae
Copy ListenerQueue in aiohttp_websockets.py
leszekhanusz Jul 13, 2024
fcd59dc
Fix importing Literal for Python 3.7
leszekhanusz Jul 13, 2024
64d6ffd
assertion instead of TransportClosed exception if websocket is None
leszekhanusz Jul 13, 2024
87b5573
small cleaning
leszekhanusz Jul 13, 2024
270d8ec
Close aiohttp session properly, inspired from aiohttp transport
leszekhanusz Jul 13, 2024
ddcc77f
Add test for ssl_close_timeout parameter
leszekhanusz Jul 14, 2024
05e61b8
Add test for client_session_args and connector_owner_false
leszekhanusz Jul 14, 2024
5e0beb2
Merge branch 'master' into aiohttp_websockets
leszekhanusz Jul 14, 2024
2af7d40
Fix handling of connection_error during init
leszekhanusz Jul 14, 2024
b529ea2
Fix RuntimeError event loop is closed exception shown during tests
leszekhanusz Jul 15, 2024
170846f
Revert "assertion instead of TransportClosed exception if websocket i…
leszekhanusz Jul 15, 2024
9a10f0d
Using _wait_closed.is_set() to determine if we need to wait or close …
leszekhanusz Jul 15, 2024
4aaf86a
Ignore low-level ping pong messages
leszekhanusz Jul 15, 2024
277fd5d
Rename timeout to websocket_close_timeout, reorder init params
leszekhanusz Jul 15, 2024
a8b276d
Modify transport init parameters
leszekhanusz Jul 15, 2024
6906ad2
Use connect_timeout param
leszekhanusz Jul 15, 2024
4ea698f
Add reference documentation + remove deprecated ssl_context param
leszekhanusz Jul 15, 2024
97ac985
Allow to use the new transport from the cli
leszekhanusz Jul 16, 2024
cfee44c
Adding a new ws test server using aiohttp to do some tests without we…
leszekhanusz Jul 16, 2024
d43224f
Try to fix ConnectionResetError exception
leszekhanusz Jul 16, 2024
04cd47c
Fix anext not existing on Python 3.8
leszekhanusz Jul 16, 2024
933348d
Adding the transport to the docs
leszekhanusz Jul 17, 2024
22e8a3a
Fix tests still using WebsocketsTransport instead of new transport
leszekhanusz Jul 17, 2024
db9f5db
Fix countdown server not closing properly in some cases
leszekhanusz Jul 17, 2024
9eaafa4
More resilient _close_coro cleanup
leszekhanusz Jul 17, 2024
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
Prev Previous commit
Next Next commit
assertion instead of TransportClosed exception if websocket is None
  • Loading branch information
leszekhanusz committed Jul 13, 2024
commit 64d6ffd294bf2069d470c2a8aec010d73f1a4345
7 changes: 1 addition & 6 deletions gql/transport/aiohttp_websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,7 @@ async def _send(self, message: Dict[str, Any]) -> None:
async def _receive(self) -> str:
"""Wait the next message from the websocket connection and log the answer"""

# It is possible that the websocket has been already closed in another task
if self.websocket is None:
raise TransportClosed("Transport is already closed")
assert self.websocket is not None

ws_message = await self.websocket.receive()

Expand Down Expand Up @@ -720,9 +718,6 @@ async def _receive_data_loop(self) -> None:
except (ConnectionResetError, TransportProtocolError) as e:
await self._fail(e, clean_close=False)
break
except TransportClosed as e:
await self._fail(e, clean_close=False)
raise e

# Parse the answer
try:
Expand Down