Skip to content
Snippets Groups Projects

Switch to psycopg 3

Merged Erwan Rouchet requested to merge psycopg3 into release-1.7.3

Part the First of https://redmine.teklia.com/issues/10050

  • All psycopg2 imports are renamed to psycopg, fortunately the modules did not move.
  • psycopg2.extras.execute_values does not exist anymore, so I had to make the cursed has_children SQL on element lists even more cursed than before.
  • psycopg does not support tuples as parameters for a IN %s construct, 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 to ARRAY[] (maybe Django 5, I forgot), and brackets are back. :shrug:
  • UUIDs are now serialized without dashes, to save four characters, so I had to update basically every assertExactQueries call.

Base image build: https://gitlab.teklia.com/arkindex/backend/-/jobs/707340

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading