Skip to content

Conversation

@chouinar
Copy link
Contributor

Ticket

#200

Changes

Upgraded psycopg, the library that connects to Postgres for SQLAlchemy, to version 3.

Context for reviewers

Version 2 was named psycopg2 but version 3 is just psycopg so that they can upgrade without changing the package name moving forward.

Changing the connection string to postgresql+psycopg tells SQLAlchemy internally to use the new library: https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#dialect-postgresql-psycopg-connect

Since we only have a few direct interactions with psycopg, the changes were fairly minimal, just adjusting the DB connection info object slightly.

Testing

Migrations, unit tests, and other automations still running fine.

Was able to pull up swagger and read/write to the DB via our endpoints.

@chouinar chouinar requested a review from lorenyu September 21, 2023 15:48
Copy link
Contributor

@lorenyu lorenyu left a comment

Choose a reason for hiding this comment

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

Nice

@chouinar chouinar merged commit 86b19bd into main Sep 22, 2023
@chouinar chouinar deleted the chouinar/psycopg3 branch September 22, 2023 14:30
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.

3 participants