@@ -48,7 +48,6 @@ def overload(x):
48
48
49
49
50
50
_local = ContextVar ("sentry_current_hub" )
51
- _initial_client = None # type: Optional[weakref.ReferenceType[Client]]
52
51
53
52
54
53
def _should_send_default_pii ():
@@ -81,12 +80,9 @@ def _init(*args, **kwargs):
81
80
82
81
This takes the same arguments as the client constructor.
83
82
"""
84
- global _initial_client
85
83
client = Client (* args , ** kwargs ) # type: ignore
86
84
Hub .current .bind_client (client )
87
85
rv = _InitGuard (client )
88
- if client is not None :
89
- _initial_client = weakref .ref (client )
90
86
return rv
91
87
92
88
@@ -263,26 +259,6 @@ def get_integration(
263
259
if rv is not None :
264
260
return rv
265
261
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
-
286
262
@property
287
263
def client (self ):
288
264
# type: () -> Optional[Client]
0 commit comments