Skip to content

psy #31155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

psy #31155

wants to merge 2 commits into from

Conversation

aspicer
Copy link
Contributor

@aspicer aspicer commented Apr 11, 2025

Important

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Problem

Changes

Does this work well for both Cloud and self-hosted?

How did you test this code?

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR migrates from the deprecated psycopg2 PostgreSQL adapter to the newer psycopg (v3) adapter across the PostHog codebase.

  • Updated database engine from django.db.backends.postgresql_psycopg2 to django.db.backends.postgresql in data_stores.py
  • Changed import statements from psycopg2 to psycopg in multiple files including test_health.py and external_data_source.py
  • Updated connection handling in warehouse models to use psycopg.connect() instead of psycopg2.connect()
  • Modified DSN parsing from psycopg2.extensions.parse_dsn to psycopg.dsn.parse in batch export functionality
  • Removed psycopg2-binary==2.9.7 dependency and updated psycopg[binary] to version 3.2.6 in pyproject.toml

6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

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