|
| 1 | +## 4.3.2 - 2025-06-06 |
| 2 | + |
| 3 | +Add context management: |
| 4 | + - New context manager with `posthog.new_context()` |
| 5 | + - Tag functions: `posthog.tag()`, `posthog.get_tags()`, `posthog.clear_tags()` |
| 6 | + - Function decorator: |
| 7 | + - `@posthog.scoped` - Creates context and captures exceptions thrown within the function |
| 8 | + - Automatic deduplication of exceptions to ensure each exception is only captured once |
| 9 | + |
| 10 | +## 4.2.1 - 2025-6-05 |
| 11 | + |
| 12 | +1. fix: feature flag request use geoip_disable (#235) |
| 13 | +2. chore: pin actions versions (#210) |
| 14 | +3. fix: opinionated setup and clean fn fix (#240) |
| 15 | +4. fix: release action failed (#241) |
| 16 | + |
| 17 | +## 4.2.0 - 2025-05-22 |
| 18 | + |
| 19 | +Add support for google gemini |
| 20 | + |
| 21 | +## 4.1.0 - 2025-05-22 |
| 22 | + |
| 23 | +Moved ai openai package to a composition approach over inheritance. |
| 24 | + |
| 25 | +## 4.0.1 – 2025-04-29 |
| 26 | + |
| 27 | +1. Remove deprecated `monotonic` library. Use Python's core `time.monotonic` function instead |
| 28 | +2. Clarify Python 3.9+ is required |
| 29 | + |
| 30 | +## 4.0.0 - 2025-04-24 |
| 31 | + |
| 32 | +1. Added new method `get_feature_flag_result` which returns a `FeatureFlagResult` object. This object breaks down the result of a feature flag into its enabled state, variant, and payload. The benefit of this method is it allows you to retrieve the result of a feature flag and its payload in a single API call. You can call `get_value` on the result to get the value of the feature flag, which is the same value returned by `get_feature_flag` (aka the string `variant` if the flag is a multivariate flag or the `boolean` value if the flag is a boolean flag). |
| 33 | + |
| 34 | +Example: |
| 35 | + |
| 36 | +```python |
| 37 | +result = posthog.get_feature_flag_result("my-flag", "distinct_id") |
| 38 | +print(result.enabled) # True or False |
| 39 | +print(result.variant) # 'the-variant-value' or None |
| 40 | +print(result.payload) # {'foo': 'bar'} |
| 41 | +print(result.get_value()) # 'the-variant-value' or True or False |
| 42 | +print(result.reason) # 'matched condition set 2' (Not available for local evaluation) |
| 43 | +``` |
| 44 | + |
| 45 | +Breaking change: |
| 46 | + |
| 47 | +1. `get_feature_flag_payload` now deserializes payloads from JSON strings to `Any`. Previously, it returned the payload as a JSON encoded string. |
| 48 | + |
| 49 | +Before: |
| 50 | + |
| 51 | +```python |
| 52 | +payload = get_feature_flag_payload('key', 'distinct_id') # "{\"some\": \"payload\"}" |
| 53 | +``` |
| 54 | + |
| 55 | +After: |
| 56 | + |
| 57 | +```python |
| 58 | +payload = get_feature_flag_payload('key', 'distinct_id') # {"some": "payload"} |
| 59 | +``` |
| 60 | + |
| 61 | +## 3.25.0 – 2025-04-15 |
| 62 | + |
| 63 | +1. Roll out new `/flags` endpoint to 100% of `/decide` traffic, excluding the top 10 customers. |
| 64 | + |
| 65 | +## 3.24.3 – 2025-04-15 |
| 66 | + |
| 67 | +1. Fix hash inclusion/exclusion for flag rollout |
| 68 | + |
| 69 | +## 3.24.2 – 2025-04-15 |
| 70 | + |
| 71 | +1. Roll out new /flags endpoint to 10% of /decide traffic |
| 72 | + |
1 | 73 | ## 3.24.1 – 2025-04-11 |
2 | 74 |
|
3 | 75 | 1. Add `log_captured_exceptions` option to proxy setup |
|
13 | 85 | ## 3.22.0 – 2025-03-26 |
14 | 86 |
|
15 | 87 | 1. Add more information to `$feature_flag_called` events. |
16 | | -2. Support for the `/decide?v=3` endpoint which contains more information about feature flags. |
| 88 | +2. Support for the `/decide?v=4` endpoint which contains more information about feature flags. |
17 | 89 |
|
18 | 90 | ## 3.21.0 – 2025-03-17 |
19 | 91 |
|
|
0 commit comments