Skip to content

feat!: switch PostgreSQL driver from psycopg2 to psycopg 3 - #70

Open
fregogui wants to merge 1 commit into
mainfrom
claude/psycopg3-migration-50fee9
Open

fregogui wants to merge 1 commit into
mainfrom
claude/psycopg3-migration-50fee9

Conversation

@fregogui

@fregogui fregogui commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Replace psycopg2 with psycopg 3.

@fregogui
fregogui force-pushed the claude/psycopg3-migration-50fee9 branch 3 times, most recently from 54a5bb5 to d0e9849 Compare October 16, 2026 14:17
Comment thread CHANGELOG.md Outdated
# Changelog

## v8.0.0 (unreleased)
## v8.0.0 (2026-10-16)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To release as the same time as wm-py

@fregogui
fregogui force-pushed the claude/psycopg3-migration-50fee9 branch from d0e9849 to 4301c32 Compare October 16, 2026 14:20
Depend on psycopg[binary] instead of psycopg2. requirements.txt pins
SQLAlchemy 2.1.4 (pulled by alembic), whose default driver for
postgresql:// URLs is psycopg 3, so configs with dialect: postgresql need
no change.

The dialect validator ignores the +driver part, so an explicit driver such
as postgresql+psycopg no longer logs a spurious warning.

BREAKING CHANGE: psycopg2 is no longer installed. With SQLAlchemy 2.0, set
dialect: postgresql+psycopg. Alembic migrations that import psycopg2 must
move to psycopg, or install psycopg2 and set dialect: postgresql+psycopg2.
@fregogui
fregogui force-pushed the claude/psycopg3-migration-50fee9 branch from 4301c32 to 93ba682 Compare October 16, 2026 14:22
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.

2 participants