Replies: 7 comments 1 reply
-
I've extracted the simplified example code here:
|
Beta Was this translation helpful? Give feedback.
-
I've just tested with Python 3.10 on Windows. The same behaviour. Hit Ctrl+C and got the same warning. |
Beta Was this translation helpful? Give feedback.
-
Ok, it seems my client-example2.py does actually works as expected on Python 3.10. Ok. UPD: no, that's not quite correct. The clean exit is possible only when connect is established. But if we waiting for connect then the same warning happens. I suppose it's a leaky astractions. |
Beta Was this translation helpful? Give feedback.
-
Just to add more info, on Linux with Python 3.6 I've got the same problem but traceback is different:
My signal handlers are ignored, AsyncClient is disconnected though, but underlying Unfortunately I don't have access to Python 3.10 there. It's an old CentOS 7. UPD: the same behaviour with Python 3.8 @ Ubuntu 20.04.4 |
Beta Was this translation helpful? Give feedback.
-
It seems odd that my signal handlers are ignored on Linux. Probably due the fact underlying engineio registers their own asyncio.loop.add_signal_handler? |
Beta Was this translation helpful? Give feedback.
-
Oh, my. I think I found the bug in your Method
Also, I have to execute at the start of my app:
To be able to attach my own signals and do my own proper shutdown. |
Beta Was this translation helpful? Give feedback.
-
Filed bug report: miguelgrinberg/python-engineio#277 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I can't figure how to properly shut down AsyncClient on Ctrl+C or SIGINT or something similar. Everything I've tried with no luck.
I always get this warning with Python 3.6:
My code for client is endless loop because I need to use AsyncClient with other asyncio code which do other operations. So I extracted the code related to socketio into working example and publish it here:
https://github.com/bialix/socketio-async-client-example
There are 2 files: client-example.py and client-example2.py. The former is simple code, the latter trying to catch Ctrl+C signal and do graceful shutdown based on the examples I found on the internet. No matter what I've tried I can't get rid of aiohttp.client.ClientSession warning.
I need help, please.
Beta Was this translation helpful? Give feedback.
All reactions