Repository navigation
docs: mark feature_enabled, get_feature_flag and get_feature_flag_payload deprecated in their docstrings - #1278
Conversation
…load deprecated in their docstrings These methods already warn at runtime, but the generated 8.x reference shows no deprecation and uses feature_enabled as the get_feature_flag_payload example. Add the runtime warning's wording to the docstrings, switch that example to evaluate_flags, and regenerate references/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR overviewNo security issues were found in this pull request. Reviews
|
SDK performance: posthog-pythonBenchmarks completed. No changes flagged for review. Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate. View all results
Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals. Each shard uses its own runner; compare Before PR against With PR within a row, not across shards. Compared 102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in |
💡 Motivation and Context
feature_enabled,get_feature_flagandget_feature_flag_payloadshow aDeprecationWarningat runtime, but their docstrings do not say that they are deprecated. Thus the generated 8.x reference shows these methods with no deprecation note. Also, theget_feature_flag_payloadexample usesfeature_enabled.In the R5 release validation, an Opus run on the current major read the 8.x reference and used
feature_enabled. Before, it usedevaluate_flags.This PR:
Client.feature_enabled,Client.get_feature_flagandClient.get_feature_flag_payload, and of the module-levelfeature_enabledandget_feature_flag. The module-levelget_feature_flag_payloaddocstring already has a deprecation paragraph, so it does not change.Client.get_feature_flag_payloadexample with theevaluate_flags()form:flags.is_enabled(key)andflags.get_flag_payload(key).references/withbin/docs --sdk-specson Python 3.11, asgenerate-references.ymldoes. The regeneration also updates one stale line,CaptureError.drops, to match the source after feat!: posthog-python 8.0 on capture v1 #1016.💚 How did you test it?
bin/docswrites the new paragraphs and example intoreferences/posthog-python-8.mdandreferences/posthog-python-reference.md.ruff format --checkpasses onposthog/__init__.py. Onposthog/client.pyit reports one lambda at line 1791, which is the same onmainand is not in this diff.📝 Checklist
If releasing new changes
sampo addto generate a changeset file. (Not added: the change is docstrings only. Add one if the reviewer wants a release for it.)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
🤖 Generated with Claude Code