Skip to content

Upgrade from psycopg2 to psycopg (version 3)#184

Closed
wuan wants to merge 1 commit intomainfrom
upgrade_psycopg
Closed

Upgrade from psycopg2 to psycopg (version 3)#184
wuan wants to merge 1 commit intomainfrom
upgrade_psycopg

Conversation

@wuan
Copy link
Copy Markdown
Owner

@wuan wuan commented Apr 22, 2026

  • Replace psycopg2 with psycopg[binary] and psycopg-pool
  • Remove psycopg2cffi (psycopg3 supports PyPy natively)
  • Update imports: psycopg, psycopg.rows, psycopg_pool
  • Change ThreadedConnectionPool to ConnectionPool
  • Change DictCursor to row_factory with psycopg.rows.DictRow
  • Remove Unicode type registration (handled by psycopg3 natively)
  • Remove compat.py (no longer needed)

- Replace psycopg2 with psycopg[binary] and psycopg-pool
- Remove psycopg2cffi (psycopg3 supports PyPy natively)
- Update imports: psycopg, psycopg.rows, psycopg_pool
- Change ThreadedConnectionPool to ConnectionPool
- Change DictCursor to row_factory with psycopg.rows.DictRow
- Remove Unicode type registration (handled by psycopg3 natively)
- Remove compat.py (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wuan
Copy link
Copy Markdown
Owner Author

wuan commented Apr 22, 2026

txpostgres requires psycopg2

@wuan wuan closed this Apr 22, 2026
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