From 1e82809d89a7bbe63365f96167d2dee1bdff6ca1 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Wed, 10 Jul 2024 18:26:51 +0200 Subject: [PATCH] ref(init): Stop using `Hub` in `init` Use `Scope` APIs only in implementation for `sentry_sdk.init`, rather than `Hub` APIs. --- sentry_sdk/hub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/hub.py b/sentry_sdk/hub.py index b9b933e27b..8e114a7de4 100644 --- a/sentry_sdk/hub.py +++ b/sentry_sdk/hub.py @@ -90,7 +90,7 @@ def _init(*args, **kwargs): This takes the same arguments as the client constructor. """ client = Client(*args, **kwargs) # type: ignore - Hub.current.bind_client(client) + Scope.get_global_scope().set_client(client) _check_python_deprecations() rv = _InitGuard(client) return rv