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
Allow password as a callable when using Postgres backend #250
Allow password as a callable when using Postgres backend #250
Conversation
I'm at a loss here - not quite sure how to get to those 100% coverage. Any help would be greatly appreciated :-) |
478831c
to
d66c0c1
Compare
Found out that it was coverage of the supplied function that was missing. Typing is now also added. Should be golden :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
e05bf10
to
ca38439
Compare
Removes the explicit naming of the password parameter for asyncpg, and moves the setting of the password to the kwargs. Further adds tests to ensure that the password argument is preserved.
ca38439
to
691313e
Compare
@vmarkovtsev I've updated the code and it should be good - thanks for the review. Hope it fits :-) |
Great, thanks for the ping 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad that it worked!
looks like the fix for this actually also fixes a regression that makes it impossible to connect to a postgres db over a unix socket (#257 ). The PR I wrote for that is nearly identical to this. I guess I can close that issue and the associated PR. |
Thank you @ugtar 👍 |
This change is intended for a case where you have changing passwords for the database, eg when using short-lived tokens.
Specifically, this allows one to use databases together with RDS IAM access, where a token is generated for new connections.