After learning a lot on differences between mono-thread async, concurrency, parallel execution, threads, etc, I came to the conclusion that aiohttp is:
Overkill for the DuniterPy usage.
Hard to implement (need an async loop, recursively add async and await keywords on all functions).
Not used in terminal little scripts, only in Sakia (may be Silkaj?).
So I want to get rid of aiohttp library and replace it with, to choose:
urllib (low-level but standard python module)
requests (high-level but external dependency)
Pro:
The developers will be able to choose their own concurrency method if needed.
The library usage will be more simple for everyone (no more async loop and keywords to understand).
Maintainers will have a simpler code to maintain.
Con:
Mostly all of the code must be refactored.
May not be ready for 1.0, but for 2.0.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
I wasn't able to, but did you find a websocket client library in the Python standard library? That would be a much better choice.
The famous websockets lib which is in Debian, and looks well maintained. This is an asyncio lib, which I understand is not something you want to go with since the goal of !118 (merged) is to get away from asynchronous code and requests.
Can you explain/document the reason how did you choose the websocket and the http (requests/urllib) libraries, explaining the pros and the cons of the chosen libraries.
I wasn't able to, but did you find a websocket client library in the Python standard library? That would be a much better choice.
No, sadly. So I have searched for a light and simple websocket lib in pypi and find a good candidate with websocket-client.
This is an asyncio lib
They are using asyncio for the server performances which raises the same problems than with aiohttp. It's too cumbersome and useless for a light client.
All the point here is to get rid of the asyncio framework.
See https://www.fullstackpython.com/websockets.html: asyncio is required for the servers because threads can not handle fast connections. websocket-client is mentioned as a well known library.
websocket-client is not listed to be in Debian
We're making a pure python library available on pypi. Not a Debian library or a rpm library or a nix library. Making packages for Linux/GNU/FreeBSD distribution is another subject.
urllib is in the Python standard library. It is low level, but quite simple.
pros:
In the Python standard library
ssl support
proxy server support
cons:
Do not handle websockets
websocket-client is the only generic client only library I found.