Switch to psycopg 3
Part the First of https://redmine.teklia.com/issues/10050
- All
psycopg2imports are renamed topsycopg, fortunately the modules did not move. -
psycopg2.extras.execute_valuesdoes not exist anymore, so I had to make the cursedhas_childrenSQL on element lists even more cursed than before. - psycopg does not support tuples as parameters for a
IN %sconstruct, so I also had to make the ListDatasetElements neighbors SQL even more cursed. - The syntax for arrays changed from
ARRAY['a', 'b', 'c']to'{a,b,c}'::text[]. It used to be the{}syntax a while ago, then something changed it toARRAY[](maybe Django 5, I forgot), and brackets are back.🤷 - UUIDs are now serialized without dashes, to save four characters, so I had to update basically every
assertExactQueriescall.
Base image build: https://gitlab.teklia.com/arkindex/backend/-/jobs/707340