Skip to content

Commit 1c4c0b9

Browse files
chore: Migrate releases to sampo
This is much closer to what we have in `posthog-js`, let's see if it's a good thing! There's still a lot to do before deploying this: - updating CI - updating README with instructions
1 parent 7ac63e1 commit 1c4c0b9

3 files changed

Lines changed: 72 additions & 51 deletions

File tree

.sampo/config.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Sampo configuration
2+
version = 1
3+
4+
[git]
5+
default_branch = "master"
6+
7+
[github]
8+
repository = "posthog/posthog-python"
9+
10+
[changelog]
11+
# Options for release notes generation.
12+
# show_commit_hash = true (default)
13+
# show_acknowledgments = true (default)
14+
15+
[packages]
16+
# Options for package discovery and filtering.
17+
# ignore_unpublished = false (default)
18+
# ignore = ["internal-*", "examples/*"]

CHANGELOG.md

Lines changed: 53 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,53 @@
1-
# 7.4.2 - 2025-12-22
1+
# posthog
2+
3+
## 7.4.2 - 2025-12-22
24

35
feat: add `in_app_modules` option to control code variables capturing
46

5-
# 7.4.1 - 2025-12-19
7+
## 7.4.1 - 2025-12-19
68

79
fix: extract model from response for OpenAI stored prompts
810

911
When using OpenAI stored prompts, the model is defined in the OpenAI dashboard rather than passed in the API request. This fix adds a fallback to extract the model from the response object when not provided in kwargs, ensuring generations show up with the correct model and enabling cost calculations.
1012

11-
# 7.4.0 - 2025-12-16
13+
## 7.4.0 - 2025-12-16
1214

1315
feat: Add automatic retries for feature flag requests
1416

1517
Feature flag API requests now automatically retry on transient failures:
18+
1619
- Network errors (connection refused, DNS failures, timeouts)
1720
- Server errors (500, 502, 503, 504)
1821
- Up to 2 retries with exponential backoff (0.5s, 1s delays)
1922

2023
Rate limit (429) and quota (402) errors are not retried.
2124

22-
# 7.3.1 - 2025-12-06
25+
## 7.3.1 - 2025-12-06
2326

2427
fix: remove unused $exception_message and $exception_type
2528

26-
# 7.3.0 - 2025-12-05
29+
## 7.3.0 - 2025-12-05
2730

2831
feat: improve code variables capture masking
2932

30-
# 7.2.0 - 2025-12-01
33+
## 7.2.0 - 2025-12-01
3134

3235
feat: add $feature_flag_evaluated_at properties to $feature_flag_called events
3336

34-
# 7.1.0 - 2025-11-26
37+
## 7.1.0 - 2025-11-26
3538

3639
Add support for the async version of Gemini.
3740

38-
# 7.0.2 - 2025-11-18
41+
## 7.0.2 - 2025-11-18
3942

4043
Add support for Python 3.14.
4144
Projects upgrading to Python 3.14 should ensure any Pydantic models passed into the SDK use Pydantic v2, as Pydantic v1 is not compatible with Python 3.14.
4245

43-
# 7.0.1 - 2025-11-15
46+
## 7.0.1 - 2025-11-15
4447

4548
Try to use repr() when formatting code variables
4649

47-
# 7.0.0 - 2025-11-11
50+
## 7.0.0 - 2025-11-11
4851

4952
NB Python 3.9 is no longer supported
5053

@@ -58,155 +61,155 @@ NB Python 3.9 is no longer supported
5861
- langchain-community: 0.3.29 → 0.4.1
5962
- langgraph: 0.6.6 → 1.0.2
6063

61-
# 6.9.3 - 2025-11-10
64+
## 6.9.3 - 2025-11-10
6265

6366
- feat(ph-ai): PostHog properties dict in GenerationMetadata
6467

65-
# 6.9.2 - 2025-11-10
68+
## 6.9.2 - 2025-11-10
6669

6770
- fix(llma): fix cache token double subtraction in Langchain for non-Anthropic providers causing negative costs
6871

69-
# 6.9.1 - 2025-11-07
72+
## 6.9.1 - 2025-11-07
7073

7174
- fix(error-tracking): pass code variables config from init to client
7275

73-
# 6.9.0 - 2025-11-06
76+
## 6.9.0 - 2025-11-06
7477

7578
- feat(error-tracking): add local variables capture
7679

77-
# 6.8.0 - 2025-11-03
80+
## 6.8.0 - 2025-11-03
7881

7982
- feat(llma): send web search calls to be used for LLM cost calculations
8083

81-
# 6.7.14 - 2025-11-03
84+
## 6.7.14 - 2025-11-03
8285

8386
- fix(django): Handle request.user access in async middleware context to prevent SynchronousOnlyOperation errors in Django 5+ (fixes #355)
8487
- test(django): Add Django 5 integration test suite with real ASGI application testing async middleware behavior
8588

86-
# 6.7.13 - 2025-11-02
89+
## 6.7.13 - 2025-11-02
8790

8891
- fix(llma): cache cost calculation in the LangChain callback
8992

90-
# 6.7.12 - 2025-11-02
93+
## 6.7.12 - 2025-11-02
9194

9295
- fix(django): Restore process_exception method to capture view and downstream middleware exceptions (fixes #329)
9396
- fix(ai/langchain): Add LangChain 1.0+ compatibility for CallbackHandler imports (fixes #362)
9497

95-
# 6.7.11 - 2025-10-28
98+
## 6.7.11 - 2025-10-28
9699

97100
- feat(ai): Add `$ai_framework` property for framework integrations (e.g. LangChain)
98101

99-
# 6.7.10 - 2025-10-24
102+
## 6.7.10 - 2025-10-24
100103

101104
- fix(django): Make middleware truly hybrid - compatible with both sync (WSGI) and async (ASGI) Django stacks without breaking sync-only deployments
102105

103-
# 6.7.9 - 2025-10-22
106+
## 6.7.9 - 2025-10-22
104107

105108
- fix(flags): multi-condition flags with static cohorts returning wrong variants
106109

107-
# 6.7.8 - 2025-10-16
110+
## 6.7.8 - 2025-10-16
108111

109112
- fix(llma): missing async for OpenAI's streaming implementation
110113

111-
# 6.7.7 - 2025-10-14
114+
## 6.7.7 - 2025-10-14
112115

113116
- fix: remove deprecated attribute $exception_personURL from exception events
114117

115-
# 6.7.6 - 2025-09-16
118+
## 6.7.6 - 2025-09-16
116119

117120
- fix: don't sort condition sets with variant overrides to the top
118121
- fix: Prevent core Client methods from raising exceptions
119122

120-
# 6.7.5 - 2025-09-16
123+
## 6.7.5 - 2025-09-16
121124

122125
- feat: Django middleware now supports async request handling.
123126

124-
# 6.7.4 - 2025-09-05
127+
## 6.7.4 - 2025-09-05
125128

126129
- fix: Missing system prompts for some providers
127130

128-
# 6.7.3 - 2025-09-04
131+
## 6.7.3 - 2025-09-04
129132

130133
- fix: missing usage tokens in Gemini
131134

132-
# 6.7.2 - 2025-09-03
135+
## 6.7.2 - 2025-09-03
133136

134137
- fix: tool call results in streaming providers
135138

136-
# 6.7.1 - 2025-09-01
139+
## 6.7.1 - 2025-09-01
137140

138141
- fix: Add base64 inline image sanitization
139142

140-
# 6.7.0 - 2025-08-26
143+
## 6.7.0 - 2025-08-26
141144

142145
- feat: Add support for feature flag dependencies
143146

144-
# 6.6.1 - 2025-08-21
147+
## 6.6.1 - 2025-08-21
145148

146149
- fix: Prevent `NoneType` error when `group_properties` is `None`
147150

148-
# 6.6.0 - 2025-08-15
151+
## 6.6.0 - 2025-08-15
149152

150153
- feat: Add `flag_keys_to_evaluate` parameter to optimize feature flag evaluation performance by only evaluating specified flags
151154
- feat: Add `flag_keys_filter` option to `send_feature_flags` for selective flag evaluation in capture events
152155

153-
# 6.5.0 - 2025-08-08
156+
## 6.5.0 - 2025-08-08
154157

155158
- feat: Add `$context_tags` to an event to know which properties were included as tags
156159

157-
# 6.4.1 - 2025-08-06
160+
## 6.4.1 - 2025-08-06
158161

159162
- fix: Always pass project API key in `remote_config` requests for deterministic project routing
160163

161-
# 6.4.0 - 2025-08-05
164+
## 6.4.0 - 2025-08-05
162165

163166
- feat: support Vertex AI for Gemini
164167

165-
# 6.3.4 - 2025-08-04
168+
## 6.3.4 - 2025-08-04
166169

167170
- fix: set `$ai_tools` for all providers and `$ai_output_choices` for all non-streaming provider flows properly
168171

169-
# 6.3.3 - 2025-08-01
172+
## 6.3.3 - 2025-08-01
170173

171174
- fix: `get_feature_flag_result` now correctly returns FeatureFlagResult when payload is empty string instead of None
172175

173-
# 6.3.2 - 2025-07-31
176+
## 6.3.2 - 2025-07-31
174177

175178
- fix: Anthropic's tool calls are now handled properly
176179

177-
# 6.3.0 - 2025-07-22
180+
## 6.3.0 - 2025-07-22
178181

179182
- feat: Enhanced `send_feature_flags` parameter to accept `SendFeatureFlagsOptions` object for declarative control over local/remote evaluation and custom properties
180183

181-
# 6.2.1 - 2025-07-21
184+
## 6.2.1 - 2025-07-21
182185

183186
- feat: make `posthog_client` an optional argument in PostHog AI providers wrappers (`posthog.ai.*`), intuitively using the default client as the default
184187

185-
# 6.1.1 - 2025-07-16
188+
## 6.1.1 - 2025-07-16
186189

187190
- fix: correctly capture exceptions processed by Django from views or middleware
188191

189-
# 6.1.0 - 2025-07-10
192+
## 6.1.0 - 2025-07-10
190193

191194
- feat: decouple feature flag local evaluation from personal API keys; support decrypting remote config payloads without relying on the feature flags poller
192195

193-
# 6.0.4 - 2025-07-09
196+
## 6.0.4 - 2025-07-09
194197

195198
- fix: add POSTHOG_MW_CLIENT setting to django middleware, to support custom clients for exception capture.
196199

197-
# 6.0.3 - 2025-07-07
200+
## 6.0.3 - 2025-07-07
198201

199202
- feat: add a feature flag evaluation cache (local storage or redis) to support returning flag evaluations when the service is down
200203

201-
# 6.0.2 - 2025-07-02
204+
## 6.0.2 - 2025-07-02
202205

203206
- fix: send_feature_flags changed to default to false in `Client::capture_exception`
204207

205-
# 6.0.1
208+
## 6.0.1
206209

207210
- fix: response `$process_person_profile` property when passed to capture
208211

209-
# 6.0.0
212+
## 6.0.0
210213

211214
This release contains a number of major breaking changes:
212215

@@ -233,15 +236,15 @@ with posthog.new_context():
233236

234237
Generally, arguments are now appropriately typed, and docstrings have been updated. If something is unclear, please open an issue, or submit a PR!
235238

236-
# 5.4.0 - 2025-06-20
239+
## 5.4.0 - 2025-06-20
237240

238241
- feat: add support to session_id context on page method
239242

240-
# 5.3.0 - 2025-06-19
243+
## 5.3.0 - 2025-06-19
241244

242245
- fix: safely handle exception values
243246

244-
# 5.2.0 - 2025-06-19
247+
## 5.2.0 - 2025-06-19
245248

246249
- feat: construct artificial stack traces if no traceback is available on a captured exception
247250

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "posthog"
7-
dynamic = ["version"]
7+
version = "7.4.2"
88
description = "Integrate PostHog into any python application."
99
authors = [{ name = "PostHog", email = "hey@posthog.com" }]
1010
maintainers = [{ name = "PostHog", email = "hey@posthog.com" }]

0 commit comments

Comments
 (0)