Skip to content

chore(deps): upgrade posthog-python (7.13.0 -> 7.20.4)#65520

Merged
hpouillot merged 18 commits into
masterfrom
hp/posthog-python-upgrade
Jun 25, 2026
Merged

chore(deps): upgrade posthog-python (7.13.0 -> 7.20.4)#65520
hpouillot merged 18 commits into
masterfrom
hp/posthog-python-upgrade

Conversation

@hpouillot

@hpouillot hpouillot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Problem

The Python PostHog SDK dependency was behind the latest published version.

Changes

Upgrades the Python SDK packages to 7.20.2:

  • posthoganalytics in the main Python dependency set and lockfile
  • posthog in ingestion acceptance test requirements

The SDK API typing changed: posthoganalytics.feature_enabled(...) now returns bool | None instead of bool. This PR adds feature_enabled_or_false(...) as a typed internal wrapper and updates bool-returning feature flag gates to treat None as disabled.

CI also surfaced an SDK mirror issue where posthoganalytics could resolve SDK-internal absolute posthog imports to this monorepo's local Django app package. The SDK-side fix is tracked in PostHog/posthog-python#693.

How did you test this code?

As an agent, I ran:

  • uv lock --upgrade-package posthoganalytics
  • uv run python - <<'PY'
    import posthoganalytics
    print(posthoganalytics.version.VERSION)
  • uv run ruff check posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py
  • uv run ty check posthog/temporal/ducklake/ducklake_copy_data_imports_workflow.py
  • Commit hooks, including bin/hogli lint:python:fix, bin/hogli format:python, and uv run ty check

Confirmed the installed version is 7.20.2.

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

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

No docs update needed.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

This PR was created with pi. Skills invoked: /debugging-ci-failures for CI triage and /improving-drf-endpoints after touching DRF API files during the type-compatibility fix.

The change uses the latest PyPI version for both the runtime package name (posthoganalytics) and the acceptance test package name (posthog). The compatibility fix keeps existing product code semantics by treating indeterminate feature flag results as disabled, instead of spreading bool | None through call sites that expose a boolean contract.

@hpouillot hpouillot self-assigned this Jun 23, 2026
@hpouillot hpouillot enabled auto-merge (squash) June 23, 2026 16:00
@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(deps): upgrade posthog-python" | Re-trigger Greptile

@tests-posthog tests-posthog Bot disabled auto-merge June 23, 2026 16:04
@hpouillot hpouillot force-pushed the hp/posthog-python-upgrade branch from c06a5d8 to e6a13b0 Compare June 23, 2026 16:15
@tests-posthog

tests-posthog Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to 767927d while workflow was testing 3ba5ccc.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

✅ Hobby deploy smoke test: PASSED

Hobby deployment smoke test passed successfully.


Run 28164440655

@hpouillot hpouillot requested a review from a team as a code owner June 23, 2026 16:56
@tests-posthog

tests-posthog Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to c8ecf12 while workflow was testing 767927d.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@hpouillot hpouillot force-pushed the hp/posthog-python-upgrade branch from c8ecf12 to 894955c Compare June 24, 2026 13:37
@tests-posthog

tests-posthog Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@hpouillot hpouillot force-pushed the hp/posthog-python-upgrade branch from 24d1323 to 5e242d2 Compare June 24, 2026 16:42
@tests-posthog

tests-posthog Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to 185c92c while workflow was testing c7dbead.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@tests-posthog

tests-posthog Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@tests-posthog

tests-posthog Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@hpouillot hpouillot force-pushed the hp/posthog-python-upgrade branch from 203386a to a5d08ae Compare June 25, 2026 08:23
@hpouillot hpouillot changed the title chore(deps): upgrade posthog-python chore(deps): upgrade posthog-python (6.7.6 -> 7.20.4) Jun 25, 2026
@hpouillot hpouillot changed the title chore(deps): upgrade posthog-python (6.7.6 -> 7.20.4) chore(deps): upgrade posthog-python (7.13.0 -> 7.20.4) Jun 25, 2026
@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@hpouillot hpouillot requested review from Gilbert09 and sakce June 25, 2026 11:35
@hpouillot hpouillot merged commit 15da339 into master Jun 25, 2026
242 of 243 checks passed
@hpouillot hpouillot deleted the hp/posthog-python-upgrade branch June 25, 2026 11:39
@deployment-status-posthog

deployment-status-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-06-25 12:15 UTC Run
prod-us ✅ Deployed 2026-06-25 12:33 UTC Run
prod-eu ✅ Deployed 2026-06-25 12:38 UTC Run

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.

3 participants