Skip to content

Commit 26d7b1b

Browse files
feat(transport): Remove HttpTransport hub_cls attribute
This change is a prerequisite for #3404. BREAKING CHANGE: Remove `sentry_sdk.transport.HttpTransport`'s `hub_cls` attribute.
1 parent 3936502 commit 26d7b1b

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

sentry_sdk/transport.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import urllib3
1313
import certifi
1414

15-
import sentry_sdk
1615
from sentry_sdk.consts import EndpointType
1716
from sentry_sdk.utils import Dsn, logger, capture_internal_exceptions
1817
from sentry_sdk.worker import BackgroundWorker
@@ -231,9 +230,6 @@ def __init__(
231230
proxy_headers=options["proxy_headers"],
232231
)
233232

234-
# Backwards compatibility for deprecated `self.hub_class` attribute
235-
self._hub_cls = sentry_sdk.Hub
236-
237233
def record_lost_event(
238234
self,
239235
reason, # type: str
@@ -604,30 +600,6 @@ def kill(self):
604600
logger.debug("Killing HTTP transport")
605601
self._worker.kill()
606602

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-
631603

632604
class _FunctionTransport(Transport):
633605
"""

0 commit comments

Comments
 (0)