Compare commits

...
Author SHA1 Message Date
David Newell b43dbfc692 changelog 2025-06-06 18:43:45 +01:00
David Newell b6c89bc443 Merge branch 'master' into dn-feat/setup-client 2025-06-06 18:42:46 +01:00
David Newell e0a7567f4f feat: add setup method 2025-06-06 18:42:00 +01:00
3 changed files with 17 additions and 8 deletions
+10 -5
View File
@@ -1,11 +1,16 @@
## 4.3.3 - 2025-06-06
Add `setup()` function to initialise default client
## 4.3.2 - 2025-06-06
Add context management:
- New context manager with `posthog.new_context()`
- Tag functions: `posthog.tag()`, `posthog.get_tags()`, `posthog.clear_tags()`
- Function decorator:
- `@posthog.scoped` - Creates context and captures exceptions thrown within the function
- Automatic deduplication of exceptions to ensure each exception is only captured once
- New context manager with `posthog.new_context()`
- Tag functions: `posthog.tag()`, `posthog.get_tags()`, `posthog.clear_tags()`
- Function decorator:
- `@posthog.scoped` - Creates context and captures exceptions thrown within the function
- Automatic deduplication of exceptions to ensure each exception is only captured once
## 4.2.1 - 2025-6-05
+6 -2
View File
@@ -580,8 +580,7 @@ def shutdown():
_proxy("join")
def _proxy(method, *args, **kwargs):
"""Create an analytics client if one doesn't exist and send to it."""
def setup():
global default_client
if not default_client:
default_client = Client(
@@ -610,6 +609,11 @@ def _proxy(method, *args, **kwargs):
default_client.disabled = disabled
default_client.debug = debug
def _proxy(method, *args, **kwargs):
"""Create an analytics client if one doesn't exist and send to it."""
setup()
fn = getattr(default_client, method)
return fn(*args, **kwargs)
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION = "4.3.2"
VERSION = "4.3.3"
if __name__ == "__main__":
print(VERSION, end="") # noqa: T201