Skip to content
Snippets Groups Projects
Commit 15f34e0a authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

Migrating to psycopg3

This will need coordination with other MR migrating other part of swh to
psycopg3, more notably, swh-core.

Updates various imports and names.

Adjusts syntax query and parameter to what psycopg3 expect. The `origins_are_blocked` of the Blocking proxy class needed significant rework for equivalent features.

Dropped timezone related work around that existed for psycopg2 < 2.9.0

Adjust the way we retrieve the connection information. This update as the same caveas as for swh-core and needs some double check.

Use the dedicated `psycopg_pool` package for connection pull.

Adds a small `execute_values_generator` helper to match existing code
expectation better (reducing the complexity of this diff).

Drops a call to the deprecated and noop `app.setup_psycopg_errorhandlers`

Add more type to help mypy and catch errors.
parent b68cb15c
No related branches found
No related tags found
Loading
Pipeline #14195 failed
Showing
with 319 additions and 271 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment