10000 ref: Remove initial_client (deprecation-)warning · etherscan-io/sentry-python@3af60ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 3af60ef

Browse files
committed
ref: Remove initial_client (deprecation-)warning
1 parent d6cd924 commit 3af60ef

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

sentry_sdk/hub.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def overload(x):
4848

4949

5050
_local = ContextVar("sentry_current_hub")
51-
_initial_client = None # type: Optional[weakref.ReferenceType[Client]]
5251

5352

5453
def _should_send_default_pii():
@@ -81,12 +80,9 @@ def _init(*args, **kwargs):
8180
8281
This takes the same arguments as the client constructor.
8382
"""
84-
global _initial_client
8583
client = Client(*args, **kwargs) # type: ignore
8684
Hub.current.bind_client(client)
8785
rv = _InitGuard(client)
88-
if client is not None:
89-
_initial_client = weakref.ref(client)
9086
return rv
9187

9288

@@ -263,26 +259,6 @@ def get_integration(
263259
if rv is not None:
264260
return rv
265261

266-
if _initial_client is not None:
267-
initial_client = _initial_client()
268-
else:
269-
initial_client = None
270-
271-
if (
272-
initial_client is not None
273-
and initial_client is not client
274-
and initial_client.integrations.get(integration_name) is not None
275-
):
276-
warning = (
277-
"Integration %r attempted to run but it was only "
278-
"enabled on init() but not the client that "
279-
"was bound to the current flow. Earlier versions of "
280-
"the SDK would consider these integrations enabled but "
281-
"this is no longer the case." % (name_or_class,)
282-
)
283-
warn(Warning(warning), stacklevel=3)
284-
logger.warning(warning)
285-
286262
@property
287263
def client(self):
288264
# type: () -> Optional[Client]

0 commit comments

Comments
 (0)
0