-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ add support for psycopg3
async
#218
base: main
Are you sure you want to change the base?
✨ add support for psycopg3
async
#218
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #218 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 582 595 +13
Branches 100 102 +2
=========================================
+ Hits 582 595 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
psycopg3
async
Seems like the cleanest thing might be wrapping the cursor in an awaitable for backwards compat, but I'm open to suggestions |
That was my thought also, to keep the API as it is and just wrap the cursor in awaitable since |
hey sorry - been super busy. I think if we wrap it in an awaitable it will be completely fine. Is this still a feature you want to work on? |
We have an architecture problem here
aiopg
implementscursor
as coroutine butpsycopg
does not. I don't know how you want to handle this decision but that's why thefmt
check fails because of the base class difference.Let me know what you decide so I can implement, I don't want to do any major changes before you see it because it affects both
CommandsAsync
andAsynConnectionType
public API.Tests pass only because I am overriding the
cursor
method inPsycopg3CommandsAsync
, but the typecheck fails as it should.