File tree Expand file tree Collapse file tree 2 files changed +0
-48
lines changed Expand file tree Collapse file tree 2 files changed +0
-48
lines changed Original file line number Diff line number Diff line change 12
12
import urllib3
13
13
import certifi
14
14
15
- import sentry_sdk
16
15
from sentry_sdk .consts import EndpointType
17
16
from sentry_sdk .utils import Dsn , logger , capture_internal_exceptions
18
17
from sentry_sdk .worker import BackgroundWorker
@@ -231,9 +230,6 @@ def __init__(
231
230
proxy_headers = options ["proxy_headers" ],
232
231
)
233
232
234
- # Backwards compatibility for deprecated `self.hub_class` attribute
235
- self ._hub_cls = sentry_sdk .Hub
236
-
237
233
def record_lost_event (
238
234
self ,
239
235
reason , # type: str
@@ -604,30 +600,6 @@ def kill(self):
604
600
logger .debug ("Killing HTTP transport" )
605
601
self ._worker .kill ()
606
602
607
- @staticmethod
608
- def _warn_hub_cls ():
609
- # type: () -> None
610
- """Convenience method to warn users about the deprecation of the `hub_cls` attribute."""
611
- warnings .warn (
612
- "The `hub_cls` attribute is deprecated and will be removed in a future release." ,
613
- DeprecationWarning ,
614
- stacklevel = 3 ,
615
- )
616
-
617
- @property
618
- def hub_cls (self ):
619
- # type: () -> type[sentry_sdk.Hub]
620
- """DEPRECATED: This attribute is deprecated and will be removed in a future release."""
621
- HttpTransport ._warn_hub_cls ()
622
- return self ._hub_cls
623
-
624
- @hub_cls .setter
625
- def hub_cls (self , value ):
626
- # type: (type[sentry_sdk.Hub]) -> None
627
- """DEPRECATED: This attribute is deprecated and will be removed in a future release."""
628
- HttpTransport ._warn_hub_cls ()
629
- self ._hub_cls = value
630
-
631
603
632
604
class _FunctionTransport (Transport ):
633
605
"""
Original file line number Diff line number Diff line change 18
18
capture_message ,
19
19
isolation_scope ,
20
20
get_isolation_scope ,
21
- Hub ,
22
21
)
23
22
from sentry_sdk .envelope import Envelope , Item , parse_json
24
23
from sentry_sdk .transport import (
25
24
KEEP_ALIVE_SOCKET_OPTIONS ,
26
25
_parse_rate_limits ,
27
- HttpTransport ,
28
26
)
29
27
from sentry_sdk .integrations .logging import LoggingIntegration , ignore_logger
30
28
@@ -649,24 +647,6 @@ def test_metric_bucket_limits_with_all_namespaces(
649
647
]
650
648
651
649
652
- def test_hub_cls_backwards_compat ():
653
- class TestCustomHubClass (Hub ):
654
- pass
655
-
656
- transport = HttpTransport (
657
- defaultdict (lambda : None , {"dsn" : "https://123abc@example.com/123" })
658
- )
659
-
660
- with pytest .deprecated_call ():
661
- assert transport .hub_cls is Hub
662
-
663
- with pytest .deprecated_call ():
664
- transport .hub_cls = TestCustomHubClass
665
-
666
- with pytest .deprecated_call ():
667
- assert transport .hub_cls is TestCustomHubClass
668
-
669
-
670
650
@pytest .mark .parametrize ("quantity" , (1 , 2 , 10 ))
671
651
def test_record_lost_event_quantity (capturing_server , make_client , quantity ):
672
652
client = make_client ()
You can’t perform that action at this time.
0 commit comments