Closed chouinar closed 11 months ago
https://github.com/navapbc/template-application-flask/issues/200
Upgraded psycopg, the library that connects to Postgres for SQLAlchemy, to version 3.
Version 2 was named psycopg2 but version 3 is just psycopg so that they can upgrade without changing the package name moving forward.
psycopg2
psycopg
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
postgresql+psycopg
Since we only have a few direct interactions with psycopg, the changes were fairly minimal, just adjusting the DB connection info object slightly.
Migrations, unit tests, and other automations still running fine.
Was able to pull up swagger and read/write to the DB via our endpoints.
Ticket
https://github.com/navapbc/template-application-flask/issues/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 justpsycopg
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-connectSince 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.