I am very interested in using this library since type support in psycopg2 is awful to work with. However, some projects still use Python 2.7, and will for another 4 years. Would it be possible to split asyncpg into two parts, one with an asynchronous API, usable with Python 3.5 and above, and one synchronous API that can be compatible across both 2.7 and 3.5 and above?
My proposal is a DB-API 2.0 (PEP 249) compatible API that can be utilized by the asyncio part of the library. The benefits is that applications that do not need asynchronous calls can use the same underlying library as those who do. With this code that doesn't rely on co-routines can use the type support provided by asyncpg.
I haven't used this project yet, or dived into its internals, and don't know whether it is feasible at all to do this. I am just venting my ideas.
I am very interested in using this library since type support in
psycopg2is awful to work with. However, some projects still use Python 2.7, and will for another 4 years. Would it be possible to splitasyncpginto two parts, one with an asynchronous API, usable with Python 3.5 and above, and one synchronous API that can be compatible across both 2.7 and 3.5 and above?My proposal is a DB-API 2.0 (PEP 249) compatible API that can be utilized by the
asynciopart of the library. The benefits is that applications that do not need asynchronous calls can use the same underlying library as those who do. With this code that doesn't rely on co-routines can use the type support provided byasyncpg.I haven't used this project yet, or dived into its internals, and don't know whether it is feasible at all to do this. I am just venting my ideas.