Drop the use of requests in the daemon tests, use aiohttp instead as
it allows the use of unix sockets, which simplifies the creation of
multiple ephimeral daemons
Hypercorn is experiencing weird behaviour when running tests and
receiving SIGPIPEs when a couple of F5s are issued from the browser.
The switch to uvicorn fixed these issues.
This commit resolves a non-deterministic test failure in `revng daemon`.
When running daemon tests, `randint` was used for selecting the listen
port, this caused test failures when the same port number was used for
reused. This has been replaced with the use of port 0 that guarantees
the use of an unused port and psutil to find the port number once it has
been bound by the daemon process.
In the future we will need to use GraphQL subscriptions. This is done
via websockets and is supported in Ariadne. However this support is
limited to ASGI frameworks, which Flask isn't a part of.
Startlette is a direct depencency of Ariadne, and all of Ariadne's
features are fully integrated with Starlette, so the switch allows to
drop some Flask integration cruft and streamline the revng.daemon
package.
Starlette does not have a built-in development server, instead
Hypercorn, which is an ASGI-compliant HTTP server, is used in place of
Flask's Werkzeug/Gunicorn for both the development and production
server roles.
This commit introduces the `revng.daemon` Python module, a Flask-powered
web application that exposes the functionality from `revng.api` across a
GraphQL API