Skip to content
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

Use Psycopg3 instead of Psycopg2 #21

Merged
merged 4 commits into from
Sep 15, 2023
Merged

Use Psycopg3 instead of Psycopg2 #21

merged 4 commits into from
Sep 15, 2023

Conversation

meksor
Copy link
Contributor

@meksor meksor commented Sep 15, 2023

Adresses #20 and adjusts the psycopg2 dependency.
Using the binary package is no longer discouraged, so this is in use because its easiest and does not require system dependencies. Read more here.

Also replaces postgresql:// platform dsn prefixes with the right ones to keep it compatible with old platforms.toml files.

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't a dsn postgresql+psycopg make it quite long and cumbersome going forward? Wouldn't it make more sense to use postgresql+psycopg2 for any "old" database instances and simply use postgresql for current ones?

@meksor
Copy link
Contributor Author

meksor commented Sep 15, 2023

That is not our choice, but sqlalchemy's. We could inspect and transform every dsn from our own format so-to-say but i would suspect that is more cumbersome than just using sqlalchemy's way.

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@meksor meksor merged commit 0e7ea6e into main Sep 15, 2023
4 checks passed
@meksor meksor deleted the psycopg3 branch September 15, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants