python-engineio 4.13.3__py3-none-any.whl → 4.13.5__py3-none-any.whl

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.
@@ -15,6 +15,8 @@ class SimpleWebSocketWSGI: # pragma: no cover
15
15
  ret = self.app(self)
16
16
  if self.ws.mode == 'gunicorn':
17
17
  raise StopIteration()
18
+ elif self.ws.mode == 'werkzeug':
19
+ raise ConnectionError()
18
20
  return ret
19
21
 
20
22
  def close(self):
@@ -147,7 +147,8 @@ async def translate_request(scope, receive, send):
147
147
  while self.event.get('more_body'):
148
148
  self.event = await receive()
149
149
  if self.event['type'] == 'http.request':
150
- self.payload += self.event.get('body') or b''
150
+ if length is None or len(self.payload) < length:
151
+ self.payload += self.event.get('body') or b''
151
152
  if length is None:
152
153
  r = self.payload
153
154
  self.payload = b''
engineio/client.py CHANGED
@@ -508,7 +508,13 @@ class Client(base_client.BaseClient):
508
508
 
509
509
  if self.write_loop_task: # pragma: no branch
510
510
  self.logger.info('Waiting for write loop task to end')
511
- self.write_loop_task.join()
511
+ try:
512
+ # the write loop task cleans its own task when it ends, so we
513
+ # avoid a race condition when using threads with a try/catch
514
+ self.write_loop_task.join()
515
+ except AttributeError: # pragma: no cover
516
+ if self.write_loop_task is not None:
517
+ raise # for any erros not related to task == None we raise
512
518
  if self.state == 'connected':
513
519
  self._trigger_event('disconnect', self.reason.TRANSPORT_ERROR,
514
520
  run_async=False)
@@ -559,7 +565,13 @@ class Client(base_client.BaseClient):
559
565
 
560
566
  if self.write_loop_task: # pragma: no branch
561
567
  self.logger.info('Waiting for write loop task to end')
562
- self.write_loop_task.join()
568
+ try:
569
+ # the write loop task cleans its own task when it ends, so we
570
+ # avoid a race condition when using threads with a try/catch
571
+ self.write_loop_task.join()
572
+ except AttributeError: # pragma: no cover
573
+ if self.write_loop_task is not None:
574
+ raise # for any erros not related to task == None we raise
563
575
  if self.state == 'connected':
564
576
  self._trigger_event('disconnect', self.reason.TRANSPORT_ERROR,
565
577
  run_async=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-engineio
3
- Version: 4.13.3
3
+ Version: 4.13.5
4
4
  Summary: Engine.IO server and client for Python
5
5
  Author-email: Miguel Grinberg <miguel.grinberg@gmail.com>
6
6
  License: MIT
@@ -33,16 +33,6 @@ python-engineio
33
33
 
34
34
  Python implementation of the `Engine.IO` realtime client and server.
35
35
 
36
- Sponsors
37
- --------
38
-
39
- The following organizations are funding this project:
40
-
41
- ![Socket.IO](https://images.opencollective.com/socketio/050e5eb/logo/64.png)<br>[Socket.IO](https://socket.io) | [Add your company here!](https://github.com/sponsors/miguelgrinberg)|
42
- -|-
43
-
44
- Many individual sponsors also support this project through small ongoing contributions. Why not [join them](https://github.com/sponsors/miguelgrinberg)?
45
-
46
36
  Resources
47
37
  ---------
48
38
 
@@ -5,7 +5,7 @@ engineio/async_socket.py,sha256=2agIDyicauuHuDHf_2WtUWreq1BP5iu5FQu9tSHWdtY,1082
5
5
  engineio/base_client.py,sha256=oOdq-zR7kg8QpvAGti0zBIiFBQGyEELwVMZNtcoJ2ig,5827
6
6
  engineio/base_server.py,sha256=tTCqc65Vzf-0Be1uunt1FuGxPOvcpOUCxnT5V2mZCWo,14763
7
7
  engineio/base_socket.py,sha256=PWiJC1msNo-0ctlP3JAwWsngKvnYM-ZjS6B6zzfu-eM,420
8
- engineio/client.py,sha256=I9wx9-JSiE1BMpULAw9-BGlpFy2Tvzl_3qshvs2ZkW4,27797
8
+ engineio/client.py,sha256=Ic4wZ_81bSEWSe86pL65B21pWj54wi0fgrrND0lP858,28525
9
9
  engineio/exceptions.py,sha256=FyuMb5qhX9CUYP3fEoe1m-faU96ApdQTSbblaaoo8LA,292
10
10
  engineio/json.py,sha256=SG5FTojqd1ix6u0dKXJsZVqqdYioZLO4S2GPL7BKl3U,405
11
11
  engineio/middleware.py,sha256=5NKBXz-ftuFErUB_V9IDvRHaSOsjhtW-NnuJtquB1nc,3750
@@ -15,17 +15,17 @@ engineio/server.py,sha256=P6Pa53MRJVoXL_n5tEONuIQoBtOvsdFR5GylKgu5oUE,23088
15
15
  engineio/socket.py,sha256=WUwGT9MByp04KjHiEnDaESosNsxYxp6AG1tB3pei9eQ,10454
16
16
  engineio/static_files.py,sha256=pwez9LQFaSQXMbtI0vLyD6UDiokQ4rNfmRYgVLKOthc,2064
17
17
  engineio/async_drivers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- engineio/async_drivers/_websocket_wsgi.py,sha256=LuOEfKhbAw8SplB5PMpYKIUqfCPEadQEpqeiq_leOIA,949
18
+ engineio/async_drivers/_websocket_wsgi.py,sha256=8kutiYG0syg3rFeqzMU3Pm-QQwaUx0F9EUUaOfKwPAU,1026
19
19
  engineio/async_drivers/aiohttp.py,sha256=SOU9KOoru_OzxLioSKCYNIZQZLoyf-oxw6-bXc6-_L8,3697
20
- engineio/async_drivers/asgi.py,sha256=9qAPXs4wO4TxTyF-Se-nhilqzufj9on63MWM66D4j0g,11535
20
+ engineio/async_drivers/asgi.py,sha256=7SkakRQTc9UGa2h4F-m40UlNewmAQ1H5bZHgTs7tS20,11612
21
21
  engineio/async_drivers/eventlet.py,sha256=n1y4OjPdj4J2GIep5N56O29oa5NQgFJVcTBjyO1C-Gs,1735
22
22
  engineio/async_drivers/gevent.py,sha256=hnJHeWdDQE2jfoLCP5DnwVPzsQlcTLJUMA5EVf1UL-k,2962
23
23
  engineio/async_drivers/gevent_uwsgi.py,sha256=m6ay5dov9FDQl0fbeiKeE-Orh5LiF6zLlYQ64Oa3T5g,5954
24
24
  engineio/async_drivers/sanic.py,sha256=GYX8YWR1GbRm-GkMTAQkfkWbY12MOT1IV2DzH0Xx8Ns,4495
25
25
  engineio/async_drivers/threading.py,sha256=ywmG59d4H6OHZjKarBN97-9BHEsRxFEz9YN-E9QAu_I,463
26
26
  engineio/async_drivers/tornado.py,sha256=v9uuGk8_HS6DjhoEKXfjHpki1FnydN4wi7eyBMsUTJA,5908
27
- python_engineio-4.13.3.dist-info/licenses/LICENSE,sha256=yel9Pbwfu82094CLKCzWRtuIev9PUxP-a76NTDFAWpw,1082
28
- python_engineio-4.13.3.dist-info/METADATA,sha256=oQ8jzRPsSix2GfT5U-uI7nViMdjeO8Zas3PsDxZhdcc,2314
29
- python_engineio-4.13.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
30
- python_engineio-4.13.3.dist-info/top_level.txt,sha256=u8PmNisCZLwRYcWrNLe9wutQ2tt4zNi8IH362c-HWuA,9
31
- python_engineio-4.13.3.dist-info/RECORD,,
27
+ python_engineio-4.13.5.dist-info/licenses/LICENSE,sha256=yel9Pbwfu82094CLKCzWRtuIev9PUxP-a76NTDFAWpw,1082
28
+ python_engineio-4.13.5.dist-info/METADATA,sha256=SdZYcLkJncA1gs80SYe1Ba-gMdac7WxOO-RicpxOeWE,1897
29
+ python_engineio-4.13.5.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
30
+ python_engineio-4.13.5.dist-info/top_level.txt,sha256=u8PmNisCZLwRYcWrNLe9wutQ2tt4zNi8IH362c-HWuA,9
31
+ python_engineio-4.13.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5