Repository navigation
Conversation
Capture v1 is the only capture path. Remove CaptureMode, the capture_mode kwarg and POSTHOG_CAPTURE_MODE, the gzip kwarg, request.batch_post and the v0 endpoint constants, and the backoff dependency. Client and AsyncPosthog constructors are keyword-only after host.
2 of 5 tasks
Contributor
posthog-python Compliance ReportDate: 2026-10-06T19:45:58.833293+00:00 ✅ All Tests Passed!116/116 tests passed Capture_V1 Tests✅ 95/95 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
Feature_Flags_Local_Evaluation Tests✅ 4/4 tests passed View Details
|
Contributor
Author
|
@greptileai review |
eli-r-ph
marked this pull request as ready for review
October 7, 2026 20:43
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
5 tasks done
dustinbyrne
reviewed
Oct 8, 2026
Comment on lines
-14
to
-15
| "$lib": "posthog-python", | ||
| "$lib_version": "<SDK_VERSION>", |
Contributor
There was a problem hiding this comment.
are these repopulated at all during ingestion? we rely on these for analytics and support. /flags also considers it (though it'll fall back to the user-agent header in absence, so i suspect this still works)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Second PR in the capture v1 series, stacked on #1017. Capture v1 becomes the only capture path, and the v0 transport is removed.
Breaking removals:
CaptureMode, thecapture_modekwarg, and thePOSTHOG_CAPTURE_MODEenv var. This followsposthog-go'sv1branch, which removed its capture mode switch too.gzipkwarg onClient/AsyncPosthog/Consumer. Usecapture_compressioninstead (default none, env varPOSTHOG_CAPTURE_COMPRESSIONstill honored).request.batch_post,EVENTS_ENDPOINT,AI_EVENTS_ENDPOINT, and the asyncasync_batch_post.gzipparameter ofrequest.postandrequest.flags. No caller passed it, and flags requests were never gzipped by the client, so flags behavior does not change.backoffdependency.ClientandAsyncPosthogconstructors are keyword-only afterhost.Other changes:
/i/v1/ai/events, uncompressed.AsyncPosthogcapture no longer needshttpx. The httpx client is now only built for flags and remote config.legacy_event_family.jsonis renamed toevent_family.json.capture_v1). The adapter drops its v0batch_postpatching.Things to review:
options: {}on every event. This shows in the regenerated snapshots. The event options PR later in the series revisits it.requestsin a thread, which matches the v1 behavior users already had when opted in.No new changeset: the major changeset on
v1already covers v0 removal. The migration guide PR lists each breaking change.💚 How did you test it?
pytestsuite,ruff format --check,ruff check,mypywith the baseline filter,python -W error -c "import posthog", the public API snapshot check, the adapter tests, anduv lock --check, all locally.test_capture_v1.py(retries,Retry-After, 408, terminal errors).test_ai_capture_lane.pynow asserts that the AI lane keeps its own path and no compression while analytics usescapture_compression="gzip", in both async andsync_mode.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written with Cursor (Claude Opus) under the direction of the assignee. Removing
CaptureModeoutright (rather than keeping a v1-only enum), collapsing the compliance job, and droppinggzipfromrequest.post/request.flagswere agent calls made to matchposthog-go'sv1branch; flag them if you want them kept.