fix: propagate missing params in module-level wrapper functions#479
Merged
dustinbyrne merged 4 commits intomasterfrom Apr 7, 2026
Merged
fix: propagate missing params in module-level wrapper functions#479dustinbyrne merged 4 commits intomasterfrom
dustinbyrne merged 4 commits intomasterfrom
Conversation
Propagate distinct_id for group_identify and flag_keys_to_evaluate for get_all_flags/get_all_flags_and_payloads through the module-level wrapper functions in posthog/__init__.py. These parameters were accepted by Client methods but not forwarded by the convenience wrappers, making them inaccessible when using the posthog.group_identify() etc. module-level API.
Contributor
posthog-python Compliance ReportDate: 2026-04-07 16:49:04 UTC ✅ All Tests Passed!0/0 tests passed |
Contributor
|
marandaneto
approved these changes
Apr 7, 2026
Member
marandaneto
left a comment
There was a problem hiding this comment.
missing changeset otherwise LGTM
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.
Problem
The module-level convenience functions in
posthog/__init__.py(e.g.posthog.group_identify(),posthog.get_all_flags()) were missing parameters that the underlyingClientmethods accept:group_identify: missingdistinct_id— callers couldn't specify a stable distinct ID, causing a random UUID to be generated on every call. This creates a garbage person record in the backend on each invocation.get_all_flags: missingflag_keys_to_evaluate— callers couldn't limit evaluation to a subset of flags.get_all_flags_and_payloads: same missingflag_keys_to_evaluate.Changes
distinct_idparameter togroup_identify()wrapper and forwarded it to the client.flag_keys_to_evaluateparameter toget_all_flags()andget_all_flags_and_payloads()wrappers and forwarded them to the client.test_module.pyverifying all three params are propagated correctly (value forwarding + default-to-None).