You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Move code under mypy type
This is incorrect, we should've added these slightly lower in the method definition to avoid mypy from breaking
* feat: Bump to 3.12.1
Copy file name to clipboardexpand all lines: posthog/__init__.py
+56-40
Original file line number
Diff line number
Diff line change
@@ -44,13 +44,6 @@ def capture(
44
44
send_feature_flags=False,
45
45
disable_geoip=None, # type: Optional[bool]
46
46
):
47
-
ifcontextisnotNone:
48
-
warnings.warn(
49
-
"The 'context' parameter is deprecated and will be removed in a future version.",
50
-
DeprecationWarning,
51
-
stacklevel=2,
52
-
)
53
-
54
47
# type: (...) -> Tuple[bool, dict]
55
48
"""
56
49
Capture allows you to capture anything a user does within your system, which you can later use in PostHog to find patterns in usage, work out which features to improve or where people are giving up.
"The 'context' parameter is deprecated and will be removed in a future version.",
72
+
DeprecationWarning,
73
+
stacklevel=2,
74
+
)
75
+
75
76
return_proxy(
76
77
"capture",
77
78
distinct_id=distinct_id,
@@ -94,13 +95,6 @@ def identify(
94
95
uuid=None, # type: Optional[str]
95
96
disable_geoip=None, # type: Optional[bool]
96
97
):
97
-
ifcontextisnotNone:
98
-
warnings.warn(
99
-
"The 'context' parameter is deprecated and will be removed in a future version.",
100
-
DeprecationWarning,
101
-
stacklevel=2,
102
-
)
103
-
104
98
# type: (...) -> Tuple[bool, dict]
105
99
"""
106
100
Identify lets you add metadata on your users so you can more easily identify who they are in PostHog, and even do things like segment users by these properties.
@@ -117,6 +111,14 @@ def identify(
117
111
})
118
112
```
119
113
"""
114
+
115
+
ifcontextisnotNone:
116
+
warnings.warn(
117
+
"The 'context' parameter is deprecated and will be removed in a future version.",
118
+
DeprecationWarning,
119
+
stacklevel=2,
120
+
)
121
+
120
122
return_proxy(
121
123
"identify",
122
124
distinct_id=distinct_id,
@@ -136,13 +138,6 @@ def set(
136
138
uuid=None, # type: Optional[str]
137
139
disable_geoip=None, # type: Optional[bool]
138
140
):
139
-
ifcontextisnotNone:
140
-
warnings.warn(
141
-
"The 'context' parameter is deprecated and will be removed in a future version.",
142
-
DeprecationWarning,
143
-
stacklevel=2,
144
-
)
145
-
146
141
# type: (...) -> Tuple[bool, dict]
147
142
"""
148
143
Set properties on a user record.
@@ -159,6 +154,14 @@ def set(
159
154
})
160
155
```
161
156
"""
157
+
158
+
ifcontextisnotNone:
159
+
warnings.warn(
160
+
"The 'context' parameter is deprecated and will be removed in a future version.",
161
+
DeprecationWarning,
162
+
stacklevel=2,
163
+
)
164
+
162
165
return_proxy(
163
166
"set",
164
167
distinct_id=distinct_id,
@@ -178,13 +181,6 @@ def set_once(
178
181
uuid=None, # type: Optional[str]
179
182
disable_geoip=None, # type: Optional[bool]
180
183
):
181
-
ifcontextisnotNone:
182
-
warnings.warn(
183
-
"The 'context' parameter is deprecated and will be removed in a future version.",
184
-
DeprecationWarning,
185
-
stacklevel=2,
186
-
)
187
-
188
184
# type: (...) -> Tuple[bool, dict]
189
185
"""
190
186
Set properties on a user record, only if they do not yet exist.
@@ -201,6 +197,14 @@ def set_once(
201
197
})
202
198
```
203
199
"""
200
+
201
+
ifcontextisnotNone:
202
+
warnings.warn(
203
+
"The 'context' parameter is deprecated and will be removed in a future version.",
204
+
DeprecationWarning,
205
+
stacklevel=2,
206
+
)
207
+
204
208
return_proxy(
205
209
"set_once",
206
210
distinct_id=distinct_id,
@@ -221,12 +225,6 @@ def group_identify(
221
225
uuid=None, # type: Optional[str]
222
226
disable_geoip=None, # type: Optional[bool]
223
227
):
224
-
ifcontextisnotNone:
225
-
warnings.warn(
226
-
"The 'context' parameter is deprecated and will be removed in a future version.",
227
-
DeprecationWarning,
228
-
stacklevel=2,
229
-
)
230
228
# type: (...) -> Tuple[bool, dict]
231
229
"""
232
230
Set properties on a group
@@ -243,6 +241,14 @@ def group_identify(
243
241
})
244
242
```
245
243
"""
244
+
245
+
ifcontextisnotNone:
246
+
warnings.warn(
247
+
"The 'context' parameter is deprecated and will be removed in a future version.",
248
+
DeprecationWarning,
249
+
stacklevel=2,
250
+
)
251
+
246
252
return_proxy(
247
253
"group_identify",
248
254
group_type=group_type,
@@ -263,12 +269,6 @@ def alias(
263
269
uuid=None, # type: Optional[str]
264
270
disable_geoip=None, # type: Optional[bool]
265
271
):
266
-
ifcontextisnotNone:
267
-
warnings.warn(
268
-
"The 'context' parameter is deprecated and will be removed in a future version.",
269
-
DeprecationWarning,
270
-
stacklevel=2,
271
-
)
272
272
# type: (...) -> Tuple[bool, dict]
273
273
"""
274
274
To marry up whatever a user does before they sign up or log in with what they do after you need to make an alias call. This will allow you to answer questions like "Which marketing channels leads to users churning after a month?" or "What do users do on our website before signing up?"
0 commit comments