python-engineio 4.13.2__tar.gz → 4.13.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_engineio-4.13.2/src/python_engineio.egg-info → python_engineio-4.13.3}/PKG-INFO +1 -1
- {python_engineio-4.13.2 → python_engineio-4.13.3}/pyproject.toml +1 -1
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_client.py +2 -2
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/client.py +2 -2
- {python_engineio-4.13.2 → python_engineio-4.13.3/src/python_engineio.egg-info}/PKG-INFO +1 -1
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_socket.py +2 -2
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/test_socket.py +5 -2
- {python_engineio-4.13.2 → python_engineio-4.13.3}/LICENSE +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/MANIFEST.in +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/README.md +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/docs/_static/README.md +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/setup.cfg +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/__init__.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/__init__.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/_websocket_wsgi.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/aiohttp.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/asgi.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/eventlet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/gevent.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/gevent_uwsgi.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/sanic.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/threading.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/tornado.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_server.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_socket.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/base_client.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/base_server.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/base_socket.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/exceptions.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/json.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/middleware.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/packet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/payload.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/server.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/socket.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/static_files.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/SOURCES.txt +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/dependency_links.txt +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/not-zip-safe +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/requires.txt +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/top_level.txt +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/__init__.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/index.html +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_aiohttp.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_asgi.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_client.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_sanic.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_server.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/async/test_tornado.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/__init__.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/index.html +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/test_client.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/test_middleware.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/test_packet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/test_payload.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/common/test_server.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/README.md +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/binary_b64_packet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/binary_packet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/json_packet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/payload.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/run.sh +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/server_receive.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tests/performance/text_packet.py +0 -0
- {python_engineio-4.13.2 → python_engineio-4.13.3}/tox.ini +0 -0
|
@@ -571,7 +571,7 @@ class AsyncClient(base_client.BaseClient):
|
|
|
571
571
|
|
|
572
572
|
async def _read_loop_websocket(self):
|
|
573
573
|
"""Read packets from the Engine.IO WebSocket connection."""
|
|
574
|
-
while self.state == 'connected':
|
|
574
|
+
while self.state == 'connected' and self.write_loop_task:
|
|
575
575
|
p = None
|
|
576
576
|
try:
|
|
577
577
|
p = await asyncio.wait_for(
|
|
@@ -672,7 +672,6 @@ class AsyncClient(base_client.BaseClient):
|
|
|
672
672
|
if r.status < 200 or r.status >= 300:
|
|
673
673
|
self.logger.warning('Unexpected status code %s in server '
|
|
674
674
|
'response, aborting', r.status)
|
|
675
|
-
self.write_loop_task = None
|
|
676
675
|
break
|
|
677
676
|
else:
|
|
678
677
|
# websocket
|
|
@@ -690,3 +689,4 @@ class AsyncClient(base_client.BaseClient):
|
|
|
690
689
|
'aborting')
|
|
691
690
|
break
|
|
692
691
|
self.logger.info('Exiting write loop task')
|
|
692
|
+
self.write_loop_task = None
|
|
@@ -521,7 +521,7 @@ class Client(base_client.BaseClient):
|
|
|
521
521
|
|
|
522
522
|
def _read_loop_websocket(self):
|
|
523
523
|
"""Read packets from the Engine.IO WebSocket connection."""
|
|
524
|
-
while self.state == 'connected':
|
|
524
|
+
while self.state == 'connected' and self.write_loop_task:
|
|
525
525
|
p = None
|
|
526
526
|
try:
|
|
527
527
|
p = self.ws.recv()
|
|
@@ -616,7 +616,6 @@ class Client(base_client.BaseClient):
|
|
|
616
616
|
if r.status_code < 200 or r.status_code >= 300:
|
|
617
617
|
self.logger.warning('Unexpected status code %s in server '
|
|
618
618
|
'response, aborting', r.status_code)
|
|
619
|
-
self.write_loop_task = None
|
|
620
619
|
break
|
|
621
620
|
else:
|
|
622
621
|
# websocket
|
|
@@ -634,3 +633,4 @@ class Client(base_client.BaseClient):
|
|
|
634
633
|
'WebSocket connection was closed, aborting')
|
|
635
634
|
break
|
|
636
635
|
self.logger.info('Exiting write loop task')
|
|
636
|
+
self.write_loop_task = None
|
|
@@ -105,13 +105,13 @@ class TestSocket:
|
|
|
105
105
|
|
|
106
106
|
async def test_schedule_ping_twice(self):
|
|
107
107
|
mock_server = self._get_mock_server()
|
|
108
|
-
mock_server.ping_interval = 0.
|
|
108
|
+
mock_server.ping_interval = 0.1
|
|
109
109
|
s = async_socket.AsyncSocket(mock_server, 'sid')
|
|
110
110
|
s.send = mock.AsyncMock()
|
|
111
111
|
|
|
112
112
|
async def schedule_ping_and_sleep():
|
|
113
113
|
s.schedule_ping()
|
|
114
|
-
await asyncio.sleep(0.
|
|
114
|
+
await asyncio.sleep(0.2)
|
|
115
115
|
|
|
116
116
|
s.schedule_ping()
|
|
117
117
|
assert s.last_ping is None
|
|
@@ -101,7 +101,10 @@ class TestSocket:
|
|
|
101
101
|
s = socket.Socket(mock_server, 'sid')
|
|
102
102
|
s.send = mock.MagicMock()
|
|
103
103
|
s.schedule_ping()
|
|
104
|
-
|
|
104
|
+
for _ in range(10):
|
|
105
|
+
time.sleep(0.05)
|
|
106
|
+
if s.last_ping is not None:
|
|
107
|
+
break
|
|
105
108
|
assert s.last_ping is not None
|
|
106
109
|
assert s.send.call_args_list[0][0][0].encode() == '2'
|
|
107
110
|
|
|
@@ -114,7 +117,7 @@ class TestSocket:
|
|
|
114
117
|
assert s.last_ping is None
|
|
115
118
|
time.sleep(0.01)
|
|
116
119
|
s.schedule_ping()
|
|
117
|
-
time.sleep(0.
|
|
120
|
+
time.sleep(0.2)
|
|
118
121
|
assert s.last_ping is not None
|
|
119
122
|
assert s.send.call_count == 1
|
|
120
123
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/_websocket_wsgi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_engineio-4.13.2 → python_engineio-4.13.3}/src/engineio/async_drivers/gevent_uwsgi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_engineio-4.13.2 → python_engineio-4.13.3}/src/python_engineio.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|