Skip to content

Upgrade to psycopg (3) and add Django 6 testing#442

Open
dracos wants to merge 2 commits intomasterfrom
django-6-psycopg3-etc
Open

Upgrade to psycopg (3) and add Django 6 testing#442
dracos wants to merge 2 commits intomasterfrom
django-6-psycopg3-etc

Conversation

@dracos
Copy link
Copy Markdown
Member

@dracos dracos commented Apr 22, 2026

Uses some of #440 (thanks @RossLYoung) for changes needed for psycopg 3.
Adds Django 6 testing and use Python 3.13 (as used on trixie) in tests.

Summary of the three code changes:
1.  IN %s with tuple → = ANY(%s) with list (psycopg3 doesn't auto-adapt tuples for IN)
2.  connection.cursor().connection.server_version → connection.pg_version (psycopg3 uses conn.info.server_version internally)
3.  location::bytea → location (psycopg2 returns bytea as memoryview, psycopg3 as bytes; GEOSGeometry handles memoryview but fails on raw binary bytes)

Co-Authored-By: ross <ross@rosslyoung.com>
@dracos dracos force-pushed the django-6-psycopg3-etc branch from 17ecca7 to f37e74e Compare April 22, 2026 10:18
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.

1 participant