Allow passing kwargs to high-level api
Hello! My case is about passing timeout argument to asyncpg backend (methods acquire, execute, fetch, etc), because it is important in async python applications.
For now it absolutely impossible. I tried to subclass Database, Connnection, PostgresBackend, PostgresConnection classes to allow passing the timeout argument, but it is a lot of copypaste code, that is hard to support.
Moving further, i thing it is cool to extend base api methods (Database, Connection and backend classes) with ability to accept **kwargs.
I too just noticed that it's not possible to pass a timeout to databases. This is normally a kwarg that can be sent to asyncpg methods 😢
I had hoped I could workaround this by wrapping database.connect in asyncio.wait_for to get a timeout, but for some reason, it's not cancelling.