Repository navigation
Conversation
Rename CaptureV1Error to CaptureError and export it from posthog. Event shaping moves to posthog.capture_event and transport to posthog.capture_send. No behavior change.
3 of 20 tasks
Contributor
posthog-python Compliance ReportDate: 2026-10-07T02:16:17.433147+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
|
4 of 5 tasks
Contributor
Author
|
@greptileai review |
eli-r-ph
marked this pull request as ready for review
October 7, 2026 20:43
dustinbyrne
approved these changes
Oct 7, 2026
dustinbyrne
left a comment
Contributor
There was a problem hiding this comment.
Looks good—the event-shaping/transport split preserves capture behavior and the existing coverage. One non-blocking release follow-up: consider documenting the public error import migration in the stack’s release notes or migration guide.
AI-assisted review.
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
Third PR in the capture v1 series, stacked on #1018. With v0 gone, "v1" no longer needs to be in the module or error names.
posthog/capture_v1.pysplits intoposthog/capture_event.py(event shaping and batch envelope) andposthog/capture_send.py(HTTP attempt, response parsing, retry loop).CaptureV1Erroris renamed toCaptureErrorand exported fromposthog. There is no alias.test_capture_v1.pysplits the same way intotest_capture_event.pyandtest_capture_send.py.No behavior change. Code and comments move as-is; only the two module docstrings are rewritten to describe their half.
Private helpers (
_send_v1_batch,_post_v1,_to_v1_event, and others) keep their names, to keep this diff a move. The next PR changesCaptureErroritself.posthog/capture.pyis deliberately avoided as a module name: it would shadow theposthog.capturefunction.💚 How did you test it?
pytestsuite (same test count as before the split),ruff format --check,ruff check,mypywith the baseline filter,python -W error -c "import posthog", the public API snapshot check, and the adapter tests, all locally.📝 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. The module split, the
CaptureErrorname, and the no-alias choice were agreed before implementation. Keeping the private_v1helper names was an agent call to keep the diff a pure move.